Documentation ¶
Index ¶
Constants ¶
View Source
const ( TAG_NAME_DB = "db" TAG_NAME_JSON = "json" TAG_NAME_PROTOBUF = "protobuf" TAG_NAME_SQLCA = "sqlca" TAG_NAME_GORM = "gorm" TAG_NAME_XORM = "xorm" )
View Source
const ( SQLCA_TAG_VALUE_AUTO_INCR = "autoincr" //auto increment SQLCA_TAG_VALUE_READ_ONLY = "readonly" //read only SQLCA_TAG_VALUE_IS_NULL = "isnull" //is nullable SQLCA_TAG_VALUE_IGNORE = "-" //ignore GORM_TAG_VALUE_AUTO_CREATE_TIME = "autoCreateTime" //gorm:"autoCreateTime" GORM_TAG_VALUE_AUTO_UPDATE_TIME = "autoUpdateTime" //gorm:"autoUpdateTime" XORM_TAG_VALUE_AUTO_CREATE_TIME = "created" //xorm:"created" XORM_TAG_VALUE_AUTO_UPDATE_TIME = "updated" //xorm:"updated" )
View Source
const ( PROTOBUF_VALUE_NAME = "name" SQLCA_CHAR_ASTERISK = "*" )
View Source
const ( DRIVER_NAME_MYSQL = "mysql" DRIVER_NAME_POSTGRES = "postgres" DRIVER_NAME_SQLITE = "sqlite3" DRIVER_NAME_MSSQL = "mssql" DRIVER_NAME_OPEN_GUASS = "opengauss" )
View Source
const ( DATABASE_KEY_NAME_WHERE = "WHERE" DATABASE_KEY_NAME_UPDATE = "UPDATE" DATABASE_KEY_NAME_SET = "SET" DATABASE_KEY_NAME_FROM = "FROM" DATABASE_KEY_NAME_DELETE = "DELETE" DATABASE_KEY_NAME_SELECT = "SELECT" DATABASE_KEY_NAME_DISTINCT = "DISTINCT" DATABASE_KEY_NAME_IN = "IN" DATABASE_KEY_NAME_NOT_IN = "NOT IN" DATABASE_KEY_NAME_OR = "OR" DATABASE_KEY_NAME_AND = "AND" DATABASE_KEY_NAME_INSERT = "INSERT INTO" DATABASE_KEY_NAME_VALUE = "VALUE" DATABASE_KEY_NAME_VALUES = "VALUES" DATABASE_KEY_NAME_FOR_UPDATE = "FOR UPDATE" DATABASE_KEY_NAME_ORDER_BY = "ORDER BY" DATABASE_KEY_NAME_ASC = "ASC" DATABASE_KEY_NAME_DESC = "DESC" DATABASE_KEY_NAME_HAVING = "HAVING" DATABASE_KEY_NAME_CASE = "CASE" DATABASE_KEY_NAME_WHEN = "WHEN" DATABASE_KEY_NAME_THEN = "THEN" DATABASE_KEY_NAME_ELSE = "ELSE" DATABASE_KEY_NAME_END = "END" DATABASE_KEY_NAME_ON = "ON" DATABASE_KEY_NAME_INNER_JOIN = "INNER JOIN" DATABASE_KEY_NAME_LEFT_JOIN = "LEFT JOIN" DATABASE_KEY_NAME_RIGHT_JOIN = "RIGHT JOIN" DATABASE_KEY_NAME_FULL_JOIN = "FULL OUTER JOIN" //MSSQL-SERVER DATABASE_KEY_NAME_SUM = "SUM" DATABASE_KEY_NAME_AVG = "AVG" DATABASE_KEY_NAME_MIN = "MIN" DATABASE_KEY_NAME_MAX = "MAX" DATABASE_KEY_NAME_COUNT = "COUNT" DATABASE_KEY_NAME_ROUND = "ROUND" DATABASE_KEY_NAME_LOCK_SHARE_MODE = "LOCK IN SHARE MODE" )
View Source
const ( ORDER_BY_ASC = "asc" ORDER_BY_DESC = "desc" DEFAULT_CAHCE_EXPIRE_SECONDS = 24 * 60 * 60 DEFAULT_PRIMARY_KEY_NAME = "id" DEFAULT_SLOW_QUERY_ALERT_TIME = 500 //milliseconds )
View Source
const ( ModelType_Struct = 1 ModelType_Slice = 2 ModelType_Map = 3 ModelType_BaseType = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdapterType ¶
type AdapterType int
const ( AdapterSqlx_MySQL AdapterType = 1 //mysql AdapterSqlx_Postgres AdapterType = 2 //postgresql AdapterSqlx_Sqlite AdapterType = 3 //sqlite AdapterSqlx_Mssql AdapterType = 4 //mssql server AdapterSqlx_OpenGauss AdapterType = 5 //open gauss )
func GetAdapterType ¶
func GetAdapterType(name string) AdapterType
func (AdapterType) DriverName ¶
func (a AdapterType) DriverName() string
func (AdapterType) GoString ¶
func (a AdapterType) GoString() string
func (AdapterType) String ¶
func (a AdapterType) String() string
type OperType ¶
type OperType int
const ( OperType_Query OperType = 1 // orm: query sql OperType_Update OperType = 2 // orm: update sql OperType_Insert OperType = 3 // orm: insert sql OperType_Upsert OperType = 4 // orm: insert or update sql OperType_Tx OperType = 5 // orm: tx sql OperType_QueryRaw OperType = 6 // raw: query sql into model OperType_ExecRaw OperType = 7 // raw: insert/update sql OperType_QueryMap OperType = 8 // raw: query sql into map OperType_Delete OperType = 9 // orm: delete sql OperType_ForUpdate OperType = 10 // orm: select ... for update sql )
Click to show internal directories.
Click to hide internal directories.