@@ -93,11 +93,19 @@ func TestColumnsToStruct(t *testing.T) {
9393func TestInnerType (t * testing.T ) {
9494 r := Result {}
9595 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
101109 "date" : "time.Time" ,
102110 "pg_catalog.time" : "time.Time" ,
103111 "pg_catalog.timetz" : "time.Time" ,
@@ -120,11 +128,19 @@ func TestInnerType(t *testing.T) {
120128func TestNullInnerType (t * testing.T ) {
121129 r := Result {}
122130 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
128144 "date" : "sql.NullTime" ,
129145 "pg_catalog.time" : "sql.NullTime" ,
130146 "pg_catalog.timetz" : "sql.NullTime" ,
0 commit comments