@@ -93,11 +93,19 @@ func TestColumnsToStruct(t *testing.T) {
93
93
func TestInnerType (t * testing.T ) {
94
94
r := Result {}
95
95
types := map [string ]string {
96
- "integer" : "int32" ,
97
- "int" : "int32" ,
98
- "pg_catalog.int4" : "int32" ,
99
- "string" : "string" ,
100
- // Date/Time Types https://www.postgresql.org/docs/current/datatype-datetime.html
96
+ // Numeric Types
97
+ // https://www.postgresql.org/docs/current/datatype-numeric.html
98
+ "integer" : "int32" ,
99
+ "int" : "int32" ,
100
+ "pg_catalog.int4" : "int32" ,
101
+ "pg_catalog.numeric" : "string" ,
102
+
103
+ // Character Types
104
+ // https://www.postgresql.org/docs/current/datatype-character.html
105
+ "string" : "string" ,
106
+
107
+ // Date/Time Types
108
+ // https://www.postgresql.org/docs/current/datatype-datetime.html
101
109
"date" : "time.Time" ,
102
110
"pg_catalog.time" : "time.Time" ,
103
111
"pg_catalog.timetz" : "time.Time" ,
@@ -120,11 +128,19 @@ func TestInnerType(t *testing.T) {
120
128
func TestNullInnerType (t * testing.T ) {
121
129
r := Result {}
122
130
types := map [string ]string {
123
- "integer" : "sql.NullInt32" ,
124
- "int" : "sql.NullInt32" ,
125
- "pg_catalog.int4" : "sql.NullInt32" ,
126
- "string" : "sql.NullString" ,
127
- // Date/Time Types https://www.postgresql.org/docs/current/datatype-datetime.html
131
+ // Numeric Types
132
+ // https://www.postgresql.org/docs/current/datatype-numeric.html
133
+ "integer" : "sql.NullInt32" ,
134
+ "int" : "sql.NullInt32" ,
135
+ "pg_catalog.int4" : "sql.NullInt32" ,
136
+ "pg_catalog.numeric" : "sql.NullString" ,
137
+
138
+ // Character Types
139
+ // https://www.postgresql.org/docs/current/datatype-character.html
140
+ "string" : "sql.NullString" ,
141
+
142
+ // Date/Time Types
143
+ // https://www.postgresql.org/docs/current/datatype-datetime.html
128
144
"date" : "sql.NullTime" ,
129
145
"pg_catalog.time" : "sql.NullTime" ,
130
146
"pg_catalog.timetz" : "sql.NullTime" ,
0 commit comments