mapping

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SqlType2GoMap = map[string]string{
	"int":                "int",
	"integer":            "int",
	"tinyint":            "int",
	"smallint":           "int",
	"mediumint":          "int",
	"bigint":             "int64",
	"int unsigned":       "uint",
	"integer unsigned":   "uint",
	"tinyint unsigned":   "uint",
	"smallint unsigned":  "uint",
	"mediumint unsigned": "uint",
	"bigint unsigned":    "uint64",
	"bit":                "int",
	"bool":               "bool",
	"enum":               "string",
	"set":                "string",
	"varchar":            "string",
	"char":               "string",
	"tinytext":           "string",
	"mediumtext":         "string",
	"text":               "string",
	"longtext":           "string",
	"blob":               "string",
	"tinyblob":           "string",
	"mediumblob":         "string",
	"longblob":           "string",
	"date":               "time.Time",
	"datetime":           "time.Time",
	"timestamp":          "time.Time",
	"time":               "time.Time",
	"float":              "float64",
	"double":             "float64",
	"decimal":            "float64",
	"binary":             "string",
	"varbinary":          "string",
	"int2":               "int",
	"int4":               "int",
	"int8":               "int64",
	"float4":             "float",
	"float8":             "float64",
}
View Source
var SqlType2IfCondMap = map[string]string{
	"int":                `0`,
	"integer":            `0`,
	"tinyint":            `0`,
	"mediumint":          `0`,
	"bigint":             `0`,
	"int unsigned":       `0`,
	"smallint":           `0`,
	"integer unsigned":   `0`,
	"tinyint unsigned":   `0`,
	"smallint unsigned":  `0`,
	"mediumint unsigned": `0`,
	"bigint unsigned":    `0`,
	"bit":                `0`,
	"bool":               `false`,
	"enum":               `0`,
	"set":                "",
	"varchar":            `""`,
	"char":               `""`,
	"tinytext":           `""`,
	"mediumtext":         `""`,
	"text":               `""`,
	"longtext":           `""`,
	"blob":               `""`,
	"tinyblob":           `""`,
	"mediumblob":         `""`,
	"longblob":           `""`,
	"date":               "",
	"datetime":           "",
	"timestamp":          "",
	"time":               "",
	"float":              `0`,
	"double":             `0`,
	"decimal":            `0`,
	"binary":             ``,
	"varbinary":          ``,
	"int*":               `0`,
	"int2":               `0`,
	"int4":               `0`,
	"int8":               `0`,
	"float4":             `0`,
	"float8":             `0`,
}
View Source
var SqlType2IfFormatMap = map[string]string{
	"int":                "%s != nil and %s != 0",
	"integer":            "%s != nil and %s != 0",
	"tinyint":            "%s != nil and %s != 0",
	"smallint":           "%s != nil and %s != 0",
	"mediumint":          "%s != nil and %s != 0",
	"bigint":             "%s != nil and %s != 0",
	"int unsigned":       "%s != nil and %s != 0",
	"integer unsigned":   "%s != nil and %s != 0",
	"tinyint unsigned":   "%s != nil and %s != 0",
	"smallint unsigned":  "%s != nil and %s != 0",
	"mediumint unsigned": "%s != nil and %s != 0",
	"bigint unsigned":    "%s != nil and %s != 0",
	"bit":                "%s != nil and %s != 0",
	"bool":               "%s != nil and %s != false",
	"enum":               "%s != nil",
	"set":                "%s != nil",
	"varchar":            "%s != nil",
	"char":               "%s != nil",
	"tinytext":           "%s != nil",
	"mediumtext":         "%s != nil",
	"text":               "%s != nil",
	"longtext":           "%s != nil",
	"blob":               "%s != nil",
	"tinyblob":           "%s != nil",
	"mediumblob":         "%s != nil",
	"longblob":           "%s != nil",
	"date":               "%s != nil",
	"datetime":           "%s != nil",
	"timestamp":          "%s != nil",
	"time":               "%s != nil",
	"float":              "%s != nil and %s != 0",
	"double":             "%s != nil and %s != 0",
	"decimal":            "%s != nil and %s != 0",
	"binary":             "%s != nil",
	"varbinary":          "%s != nil",
	"int*":               "%s != nil and %s != 0",
	"int2":               "%s != nil and %s != 0",
	"int4":               "%s != nil and %s != 0",
	"int8":               "%s != nil and %s != 0",
	"float4":             "%s != nil and %s != 0",
	"float8":             "%s != nil and %s != 0",
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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