package
1.28.2
Repository: https://github.com/webx-top/db.git
Documentation: pkg.go.dev

# Functions

BuildBatchInsert 生成批量插入SQL.
BuildBatchUpdate 生成批量更新SQL.
BuildSelectCase : 生成CASE...ELSE...END SELECT status, CASE status WHEN 1 THEN '待查询' WHEN 2 THEN '审核中' WHEN 3 THEN '审核通过' WHEN 4 THEN '审核拒绝' ELSE 'Unknown' END statusName, count(status) FROM order GROUP BY status;.
Clean 清理掉表中不存在的字段.
CleanBy 清理掉表中不存在的字段.
No description provided by the author
ColumnComment 查询表中某些列的注释.
No description provided by the author
CopyTableStruct 复制表结构到新表.
CreateTableSQL 查询建表语句.
EqField 单字段相等查询.
FieldExists 查询表字段是否存在.
No description provided by the author
No description provided by the author
GenDateRange 生成日期范围条件 生成日期范围条件 @param field 字段名。支持搜索多个字段,各个字段之间用半角逗号“,”隔开 @param keywords 关键词.
GetTables 获取数据表列表.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
MoveToTable 移动数据到新表.
RangeField 字段范围查询.
ReplacePrefix UPDATE table_name SET `field`=REPLACE(`field`,'oldPrefix','newPrefix') WHERE `field` LIKE 'oldPrefix%';.
SearchField 搜索某个字段(多个字段同时匹配) @param field 字段名。支持搜索多个字段,各个字段之间用半角逗号“,”隔开 @param keywords 关键词 @param idFields 如要搜索id字段需要提供id字段名 @author swh <[email protected]>.
SearchFields 搜索某个字段(多个字段任一匹配) @param fields 字段名 @param keywords 关键词 @param idFields 如要搜索id字段需要提供id字段名 @author swh <[email protected]>.
TableComment 查询表注释.
TableExists 查询表是否存在.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SQLColumnComment 查询列注释的SQL.
SQLFieldExists 查询字段是否存在的SQL.
SQLShowCreate 查询建表语句的SQL.
SQLTableComment 查询表注释的SQL.
SQLTableExists 查询表是否存在的SQL.

# Type aliases

No description provided by the author