@@ -178,7 +178,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
178178 return "pqtype.NullRawMessage"
179179 }
180180 default :
181- return "interface{} "
181+ return "any "
182182 }
183183
184184 case "jsonb" , "pg_catalog.jsonb" :
@@ -194,7 +194,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
194194 return "pqtype.NullRawMessage"
195195 }
196196 default :
197- return "interface{} "
197+ return "any "
198198 }
199199
200200 case "bytea" , "blob" , "pg_catalog.bytea" :
@@ -293,7 +293,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
293293 case opts .SQLDriverLibPQ :
294294 return "pqtype.Inet"
295295 default :
296- return "interface{} "
296+ return "any "
297297 }
298298
299299 case "cidr" :
@@ -308,7 +308,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
308308 case opts .SQLDriverLibPQ :
309309 return "pqtype.CIDR"
310310 default :
311- return "interface{} "
311+ return "any "
312312 }
313313
314314 case "macaddr" , "macaddr8" :
@@ -320,7 +320,7 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
320320 case opts .SQLDriverLibPQ :
321321 return "pqtype.Macaddr"
322322 default :
323- return "interface{} "
323+ return "any "
324324 }
325325
326326 case "ltree" , "lquery" , "ltxtquery" :
@@ -359,15 +359,15 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
359359 case opts .SQLDriverPGXV5 :
360360 return "pgtype.Range[pgtype.Date]"
361361 default :
362- return "interface{} "
362+ return "any "
363363 }
364364
365365 case "datemultirange" :
366366 switch driver {
367367 case opts .SQLDriverPGXV5 :
368368 return "pgtype.Multirange[pgtype.Range[pgtype.Date]]"
369369 default :
370- return "interface{} "
370+ return "any "
371371 }
372372
373373 case "tsrange" :
@@ -377,15 +377,15 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
377377 case opts .SQLDriverPGXV5 :
378378 return "pgtype.Range[pgtype.Timestamp]"
379379 default :
380- return "interface{} "
380+ return "any "
381381 }
382382
383383 case "tsmultirange" :
384384 switch driver {
385385 case opts .SQLDriverPGXV5 :
386386 return "pgtype.Multirange[pgtype.Range[pgtype.Timestamp]]"
387387 default :
388- return "interface{} "
388+ return "any "
389389 }
390390
391391 case "tstzrange" :
@@ -395,15 +395,15 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
395395 case opts .SQLDriverPGXV5 :
396396 return "pgtype.Range[pgtype.Timestamptz]"
397397 default :
398- return "interface{} "
398+ return "any "
399399 }
400400
401401 case "tstzmultirange" :
402402 switch driver {
403403 case opts .SQLDriverPGXV5 :
404404 return "pgtype.Multirange[pgtype.Range[pgtype.Timestamptz]]"
405405 default :
406- return "interface{} "
406+ return "any "
407407 }
408408
409409 case "numrange" :
@@ -413,15 +413,15 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
413413 case opts .SQLDriverPGXV5 :
414414 return "pgtype.Range[pgtype.Numeric]"
415415 default :
416- return "interface{} "
416+ return "any "
417417 }
418418
419419 case "nummultirange" :
420420 switch driver {
421421 case opts .SQLDriverPGXV5 :
422422 return "pgtype.Multirange[pgtype.Range[pgtype.Numeric]]"
423423 default :
424- return "interface{} "
424+ return "any "
425425 }
426426
427427 case "int4range" :
@@ -431,15 +431,15 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
431431 case opts .SQLDriverPGXV5 :
432432 return "pgtype.Range[pgtype.Int4]"
433433 default :
434- return "interface{} "
434+ return "any "
435435 }
436436
437437 case "int4multirange" :
438438 switch driver {
439439 case opts .SQLDriverPGXV5 :
440440 return "pgtype.Multirange[pgtype.Range[pgtype.Int4]]"
441441 default :
442- return "interface{} "
442+ return "any "
443443 }
444444
445445 case "int8range" :
@@ -449,22 +449,22 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
449449 case opts .SQLDriverPGXV5 :
450450 return "pgtype.Range[pgtype.Int8]"
451451 default :
452- return "interface{} "
452+ return "any "
453453 }
454454
455455 case "int8multirange" :
456456 switch driver {
457457 case opts .SQLDriverPGXV5 :
458458 return "pgtype.Multirange[pgtype.Range[pgtype.Int8]]"
459459 default :
460- return "interface{} "
460+ return "any "
461461 }
462462
463463 case "hstore" :
464464 if driver .IsPGX () {
465465 return "pgtype.Hstore"
466466 }
467- return "interface{} "
467+ return "any "
468468
469469 case "bit" , "varbit" , "pg_catalog.bit" , "pg_catalog.varbit" :
470470 if driver == opts .SQLDriverPGXV5 {
@@ -549,16 +549,16 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
549549
550550 case "void" :
551551 // A void value can only be scanned into an empty interface.
552- return "interface{} "
552+ return "any "
553553
554554 case "any" :
555- return "interface{} "
555+ return "any "
556556
557557 default :
558558 rel , err := parseIdentifierString (columnType )
559559 if err != nil {
560560 // TODO: Should this actually return an error here?
561- return "interface{} "
561+ return "any "
562562 }
563563 if rel .Schema == "" {
564564 rel .Schema = req .Catalog .DefaultSchema
@@ -602,5 +602,5 @@ func postgresType(req *plugin.GenerateRequest, options *opts.Options, col *plugi
602602 if debug .Active {
603603 log .Printf ("unknown PostgreSQL type: %s\n " , columnType )
604604 }
605- return "interface{} "
605+ return "any "
606606}
0 commit comments