pgsql

package
v1.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GoToPGSQLTypes = map[string]string{
	"bool":            "boolean",
	"int64":           "bigint",
	"int":             "integer",
	"int8":            "smallint",
	"int16":           "smallint",
	"int32":           "integer",
	"uint":            "integer",
	"uint8":           "smallint",
	"uint16":          "smallint",
	"uint32":          "integer",
	"uint64":          "bigint",
	"uintptr":         "bigint",
	"znullint64":      "bigint",
	"znullint32":      "integer",
	"znullbyte":       "integer",
	"float64":         "double precision",
	"float32":         "real",
	"complex64":       "double precision",
	"complex128":      "double precision",
	"customfloat64":   "double precisio",
	"string":          "text",
	"Pointer":         "bigint",
	"[]byte":          "bytea",
	"customdate":      "date",
	"customtime":      "time",
	"customtimestamp": "timestamp",
	"sqlfloat64":      "double precision",
	"sqlfloat16":      "double precision",
	"sqluuid":         "uuid",
	"sqljsonb":        "jsonb",
	"sqljson":         "json",
	"sqlint64":        "bigint",
	"sqlint32":        "integer",
	"sqlint16":        "integer",
	"sqlbool":         "boolean",
	"sqlstring":       "string",
	"nullablejsonb":   "jsonb",
	"nullablejson":    "json",
	"nullableuuid":    "uuid",
	"sqldate":         "date",
	"sqltime":         "time",
	"sqltimestamp":    "timestamp",
	"citext":          "citext",
}
View Source
var GoToStdTypes = map[string]string{
	"bool":            "boolean",
	"int64":           "integer",
	"int":             "integer",
	"int8":            "integer",
	"int16":           "integer",
	"int32":           "integer",
	"uint":            "integer",
	"uint8":           "integer",
	"uint16":          "integer",
	"uint32":          "integer",
	"uint64":          "integer",
	"uintptr":         "integer",
	"znullint64":      "integer",
	"znullint32":      "integer",
	"znullbyte":       "integer",
	"float64":         "double",
	"float32":         "double",
	"complex64":       "double",
	"complex128":      "double",
	"customfloat64":   "double",
	"string":          "string",
	"Pointer":         "integer",
	"[]byte":          "blob",
	"customdate":      "string",
	"customtime":      "string",
	"customtimestamp": "string",
	"sqlfloat64":      "double",
	"sqlfloat16":      "double",
	"sqluuid":         "uuid",
	"sqljsonb":        "jsonb",
	"sqljson":         "json",
	"sqlint64":        "bigint",
	"sqlint32":        "integer",
	"sqlint16":        "integer",
	"sqlbool":         "boolean",
	"sqlstring":       "string",
	"nullablejsonb":   "jsonb",
	"nullablejson":    "json",
	"nullableuuid":    "uuid",
	"sqldate":         "date",
	"sqltime":         "time",
	"sqltimestamp":    "timestamp",
}

Functions

func ConvertSQLType

func ConvertSQLType(anytype string) string

func GetPostgresKeywords

func GetPostgresKeywords() []string

func GetSQLType

func GetSQLType(anytype string) string

func GetStdTypeFromGo

func GetStdTypeFromGo(pTypeName string) string

func IsGoType

func IsGoType(pTypeName string) bool

func ValidSQLType

func ValidSQLType(sqltype string) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL