2
0

pgtype Int2, Int4, and Int8 fields include bit size

e.g. Instead of Int it is Int64. This matches the pattern set by the
database/sql types.
This commit is contained in:
Jack Christensen
2022-03-05 09:10:58 -06:00
parent 872a7a9315
commit d723a4ab6f
12 changed files with 206 additions and 206 deletions
+3 -3
View File
@@ -44,7 +44,7 @@ func (dst *Int2) Scan(src interface{}) error {
return err
}
*dst = Int2(nullable.Int)
*dst = Int2(nullable.Int16)
return nil
}
@@ -92,7 +92,7 @@ func (dst *Int4) Scan(src interface{}) error {
return err
}
*dst = Int4(nullable.Int)
*dst = Int4(nullable.Int32)
return nil
}
@@ -140,7 +140,7 @@ func (dst *Int8) Scan(src interface{}) error {
return err
}
*dst = Int8(nullable.Int)
*dst = Int8(nullable.Int64)
return nil
}
+1 -1
View File
@@ -45,7 +45,7 @@ func (dst *Int<%= pg_byte_size %>) Scan(src interface{}) error {
return err
}
*dst = Int<%= pg_byte_size %>(nullable.Int)
*dst = Int<%= pg_byte_size %>(nullable.Int<%= pg_bit_size %>)
return nil
}