本文整理汇总了Golang中github.com/quintans/goSQL/db.Column类的典型用法代码示例。如果您正苦于以下问题:Golang Column类的具体用法?Golang Column怎么用?Golang Column使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Column类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: AddRangeCriteria
func AddRangeCriteria(conditions []*db.Criteria, column *db.Column, leftBound interface{}, rightBound interface{}) ([]*db.Criteria, bool) {
if !IsNil(leftBound) || !IsNil(rightBound) {
conditions = append(conditions, column.Range(leftBound, rightBound))
return conditions, true
}
return conditions, false
}
示例2: AddWildNoCaseCriteria
func AddWildNoCaseCriteria(conditions []*db.Criteria, column *db.Column, value *string) ([]*db.Criteria, bool) {
if !IsEmpty(value) {
conditions = append(conditions, column.ILike("%"+*value+"%"))
return conditions, true
}
return conditions, false
}
示例3: AddEqualCriteria
func AddEqualCriteria(conditions []*db.Criteria, column *db.Column, value interface{}) ([]*db.Criteria, bool) {
if !IsNil(value) {
conditions = append(conditions, column.Matches(value))
return conditions, true
}
return conditions, false
}
示例4: AddNoCaseCriteria
func AddNoCaseCriteria(conditions []*db.Criteria, column *db.Column, value *string) ([]*db.Criteria, bool) {
if !IsEmpty(value) {
var criteria *db.Criteria
if HasWildcards(value) {
criteria = column.ILike(value)
} else {
criteria = column.IMatches(value)
}
conditions = append(conditions, criteria)
return conditions, true
}
return conditions, false
}
示例5: ColumnName
func (this *GenericTranslator) ColumnName(column *db.Column) string {
return column.GetName()
}
示例6: ColumnName
func (this *FirebirdSQLTranslator) ColumnName(column *db.Column) string {
return "\"" + strings.ToUpper(column.GetName()) + "\""
}
示例7: GetAutoNumberQuery
func (this *FirebirdSQLTranslator) GetAutoNumberQuery(column *db.Column) string {
return "select GEN_ID(" + column.GetTable().GetName() + "_GEN, 1) from RDB$DATABASE"
}
示例8: ColumnName
func (this *MySQL5Translator) ColumnName(column *db.Column) string {
return "`" + strings.ToUpper(column.GetName()) + "`"
}
示例9: ColumnName
func (this *OracleTranslator) ColumnName(column *db.Column) string {
return "\"" + strings.ToUpper(column.GetName()) + "\""
}
示例10: GetAutoNumberQuery
func (this *OracleTranslator) GetAutoNumberQuery(column *db.Column) string {
return "select " + strings.ToUpper(column.GetTable().GetName()) + "_SEQ.nextval from dual"
}
示例11: ColumnName
func (this *PostgreSQLTranslator) ColumnName(column *db.Column) string {
return strings.ToLower(column.GetName())
}