< Prev: Numbers
Up: Column Types
Next: TIMESTAMPTZ/DATETIME >

Column Types: Strings

The sq representation of all textual types (VARCHAR, TEXT, etc) is the StringField. You can convert a string into a StringField:
func String(s string) StringField
Here are the available Predicate operations on a StringField:
func (f StringField) IsNull() Predicate          // f IS NULL
func (f StringField) IsNotNull() Predicate       // f IS NOT NULL
func (f StringField) In(v interface{}) Predicate // f IN (v)

// StringField
func (f StringField) Eq(field StringField) Predicate // f = field
func (f StringField) Ne(field StringField) Predicate // f <> field
func (f StringField) Gt(field StringField) Predicate // f > field
func (f StringField) Ge(field StringField) Predicate // f >= field
func (f StringField) Lt(field StringField) Predicate // f < field
func (f StringField) Le(field StringField) Predicate // f <= field

// string
func (f StringField) EqString(s string) Predicate       // f = s
func (f StringField) NeString(s string) Predicate       // f <> s
func (f StringField) GtString(s string) Predicate       // f > s
func (f StringField) GeString(s string) Predicate       // f >= s
func (f StringField) LtString(s string) Predicate       // f < s
func (f StringField) LeString(s string) Predicate       // f <= s
func (f StringField) LikeString(s string) Predicate     // f LIKE s
func (f StringField) NotLikeString(s string) Predicate  // f NOT LIKE s
func (f StringField) ILikeString(s string) Predicate    // f ILIKE s (postgres only)
func (f StringField) NotILikeString(s string) Predicate // f NOT ILIKE s (postgres only)
< Prev: Numbers
Up: Column Types
Next: TIMESTAMPTZ/DATETIME >