Example #1
0
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
}
Example #2
0
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
}