Documentation ¶
Index ¶
Constants ¶
View Source
const ( Dev = "dev" Prod = "prod" GtSubSQL = "sub_sql" GtClientPage = "clientPage" GtClientPageUnderLine = "client_page" GtEveryPage = "everyPage" GtEveryPageUnderLine = "every_page" GtOrder = "order" GtKey = "key" GtMock = "mock" // GT tag GT = "gt" GtField = "field" GtValid = "valid" GtTrans = "trans" GtIgnore = "ignore" GtLike = "like" Gt_ = "-" GtComma = "," GtGorm = "gorm" GtGormColumn = "column" GtExist = "exist" GtSoftDel = "soft_del" )
devMode const key words
View Source
const ( ClientPage = 1 EveryPage = 10 )
default page
View Source
const ( SQL_ = "SQL_" WhereS = "where %s " AndS = "and %s " OrderDesc = "%s.id desc" OrderS = "order by %s " And = " and " ParamAnd = " = ?" + And ParamLike = " like binary ? and " ParamInAnd = " in (?) and " SelectFrom = "select %s from %s " Distinct = "distinct " Count = "count(*) as total_num" CountDistinct = "count(distinct %s) as total_num" SelectCount = "select " + Count + " " SelectCountDistinct = "select " + CountDistinct + " " SelectCountFrom = SelectCount + "from %s " SoftDel = "%s.%s is not null and " )
part sql
Variables ¶
View Source
var ( Backticks uint8 = '`' // different sql mark ConfPath = "conf/app.yaml" DefaultDevMode = "app.devMode" ConfDB = "app.db" ConfDBName = "app.db.name" ConfRedis = "app.redis" ConfNsqProducerAddr = "app.nsq.producer_addr" ConfNsqConsumerAddr = "app.nsq.consumer_addr" ConfMongo = "app.mongo" ConfFile = "app.filepath" ConfTaskNum = "app.daemon.task_num" ConfLogLevel = "app.log.level" )
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.