modulepackage
0.0.0-20210826032816-ecaad8462bc6
Repository: https://github.com/wuhuizuo/sqlm.git
Documentation: pkg.go.dev
# README
sqlm
use sqlx to model record CRUD efficiently
# Functions
DBCreateDrivers returns a sorted list of the names of the registered create drivers.
DBCreateIterStructField 遍历配置模型的各个配置属性创建数据表.
JSONColScan unmarshal from db JSON column.
NewMockRowFilter creates a new mock instance.
NewMockTableAble creates a new mock instance.
NewTableOutput return write device with db table backend.
NewTableSchema from record type.
RegisterDBCreator register database create for given driver.
StringColScan unmarshal from db string column.
UniqWhereFormatter uniq record select filter.
UnRegisterDBCreator uninstall database create driver.
Write common write logic for table backend.
# Constants
AttrDefaultMySQL `default` attribute for mysql table DDL.
AttrDefaultSQLite `default` attribute for sqlite table DDL.
AttrNotNullMySQL `not null` attribute for mysql table DDL.
AttrNotNullSQLite `not null` attribute for sqlite table DDL.
AttrOnUpdateMySQL `on update` attribute for mysql table DDL.
for db datetime type.
is `CURRENT_TIMESTAMP`.
struct field tag for marshal to json.
for col schema key: auto_increment.
the column should returned zero when simple list.
for col schema key: default.
for col schema key: key.
for col schema key: not_insert.
for col schema key: not_null.
for col schema key: not_update.
for col schema key: on_update => ON UPDATE.
for col schema key: primary.
split table by column's value, usually value range is limited.
for col schema key: type.
for col schema key: uniq.
struct field tag for table column schema.
DriverMysql mysql driver type.
DriverSQLite sqlite driver type.
DriverSQLite3 sqlite driver type limit sqlite version: v3+.
False for col schema val: false.
SQL 关键字.
SQL 关键字.
SQL 关键字.
SQL 关键字.
SQL 关键字.
TableNotExistErrorRegex for table not exist db response.
True for col schema val: true.
# Structs
BetweenFilter for col value filter with range.
ColListFilter col value list filter.
ColSchema for table column.
Database sql database.
ErrorSQLInvalid error when composed invalid sql statement.
HashColFilter for db json col with hash type.
JoinReplacer 联合查询表明替换信息.
LikeFilter for like filter.
ListOptions for Table#List().
MockRowFilter is a mock of RowFilter interface.
MockRowFilterMockRecorder is the mock recorder for MockRowFilter.
MockTableAble is a mock of TableAble interface.
MockTableAbleMockRecorder is the mock recorder for MockTableAble.
Query sql select query info.
SQLWhere present where infos for sql composing.
StructFilter 使用结构体作为过滤器.
Table Sql Table.
TableHooks for all operation before and after for the table.
TableOperateHook hook for single kind operation.
TableOutput implement write support for db table.
TableSchema for table.
# Interfaces
No description provided by the author
RowFilter for compose where statements in query.
TableAble is the interface that groups table curd methods.
# Type aliases
DeleteHookFunc hook for table delete records operation.
HashCol hash col.
IDListFilter id list filter.
InsertHookFunc hook for table insert record operation.
InsertsHookFunc hook for table inserts records operation.
NullString store db string columns allow empty.
RowFilterAnd for compose filters.
SaveHookFunc hook for table single record update operation.
SelectorFilter simple map selector filter.
StringList string list col.
TimeFormatFn for time object.
UpdateHookFunc hook for table records update operation.
URLQueryValues query params for http request.
ValList list col.