query

package
Version: v0.0.0-...-b45a7ae Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeQueryStringAttributes

func DecodeQueryStringAttributes(fields field.StructType, strings map[string][]string) map[string]values.Value

Types

type ArrayExpression

type ArrayExpression interface {
	Expression

	IsEmpty() bool
}

func Array

func Array(values interface{}) ArrayExpression

type Expression

type Expression interface {
	// TODO: not responsiblity here
	SQL(context *ExpressionContext) (string, []interface{})
}

func And

func And(expressions ...Expression) Expression

func Field

func Field(name string, matcher FieldMatcher) Expression

type ExpressionContext

type ExpressionContext struct {
	CurrentReference string
}

type FieldMatcher

type FieldMatcher interface {
	IsCompound() bool
	IsContradiction() bool
	SQL(context *SubContext) (string, []interface{})
}

func Equals

func Equals(value interface{}) FieldMatcher

func HasAnyMatching

func HasAnyMatching(matcher Expression) FieldMatcher

func IsIn

func IsIn(valuesSource ArrayExpression) FieldMatcher

func IsLessThan

func IsLessThan(value interface{}) FieldMatcher

func IsNull

func IsNull() FieldMatcher

type OrderClause

type OrderClause string

func (OrderClause) IsValid

func (c OrderClause) IsValid() bool

func (OrderClause) SafeSQL

func (c OrderClause) SafeSQL() string

type SubContext

type SubContext struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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