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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user