quals

package
v5.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2024 License: Apache-2.0 Imports: 1 Imported by: 5

Documentation

Overview

Package quals is the SDK representation of a SQL query qualifier, i.e. a value used in a where clause

Index

Constants

View Source
const (
	QualOperatorEqual          = "="
	QualOperatorNotEqual       = "<>"
	QualOperatorLess           = "<"
	QualOperatorLessOrEqual    = "<="
	QualOperatorGreater        = ">"
	QualOperatorGreaterOrEqual = ">="
	QualOperatorLike           = "~~"
	QualOperatorNotLike        = "!~~"
	QualOperatorILike          = "~~*"
	QualOperatorNotILike       = "!~~*"
	QualOperatorRegex          = "~"
	QualOperatorNotRegex       = "!~"
	QualOperatorIRegex         = "~*"
	QualOperatorNotIRegex      = "!~*"
	QualOperatorIsNull         = "is null"
	QualOperatorIsNotNull      = "is not null"

	QualOperatorJsonbContainsLeftRight = "@>"
	QualOperatorJsonbContainsRightLeft = "<@"
	QualOperatorJsonbExistsOne         = "?"
	QualOperatorJsonbExistsAny         = "?|"
	QualOperatorJsonbExistsAll         = "?&"
	QualOperatorJsonbPathExists        = "@?"
	QualOperatorJsonbPathPredicate     = "@@" // FIXME: I'm a little confused about this one
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Qual

type Qual struct {
	Column   string
	Operator string
	Value    *proto.QualValue
}

Qual is a struct which represents a database qual in a more easily digestible form that proto.Qual

func NewQual

func NewQual(q *proto.Qual) *Qual

func (*Qual) Equals

func (q *Qual) Equals(other *Qual) bool

func (*Qual) ToProto

func (q *Qual) ToProto() *proto.Qual

type QualSlice

type QualSlice []*Qual

func (QualSlice) Contains

func (s QualSlice) Contains(other *Qual) bool

func (QualSlice) SingleEqualsQual

func (s QualSlice) SingleEqualsQual() bool

func (QualSlice) ToProto

func (s QualSlice) ToProto() *proto.Quals

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL