Documentation ¶
Index ¶
- Variables
- func CreateTable(db *sqlx.DB, tableStruct any) error
- func DeleteAllRows(db *sqlx.DB, tableStructQuery any) error
- func DeleteMany(db *sqlx.DB, tableStructQuery any) error
- func FindMany(db *sqlx.DB, tableStructQuery, tableStruct any) error
- func FindManyLimitSkip(db *sqlx.DB, tableStructQuery, tableStruct any, limit, skip int) error
- func FindOne(db *sqlx.DB, tableStructQuery, tableStruct any) error
- func InsertMany(db *sqlx.DB, tablesStructs []interface{}) error
- func InsertOne(db *sqlx.DB, tableStruct any) error
- func UpdateMany(db *sqlx.DB, tableStructQuery, tableStructUpdate any) error
- type StructFieldsInfo
- type StructInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ID_AUTO_INCREMENT = map[string]string{
"sqlite3": "INTEGER PRIMARY KEY AUTOINCREMENT",
"postgres": "SERIAL PRIMARY KEY",
"mysql": "INT AUTO_INCREMENT PRIMARY KEY",
}
View Source
var SQL_DATA_TYPES = map[string]string{
"int": "INTEGER",
"string": "TEXT",
"float": "REAL",
}
Functions ¶
func FindManyLimitSkip ¶
func InsertMany ¶
Types ¶
type StructFieldsInfo ¶
type StructInfo ¶
type StructInfo struct { StructName string StructFieldsInfo []StructFieldsInfo }
func ExtractTableStructInfo ¶
func ExtractTableStructInfo(tableStruct any, fillSQLTypes bool, driverName string) StructInfo
Click to show internal directories.
Click to hide internal directories.