query

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StringFromValue

func StringFromValue(value interface{}) string

Types

type Builder

type Builder struct {

	// reusable buffer for building queryString
	bytes.Buffer
	// contains filtered or unexported fields
}

A fluent query builder

func NewBuilder

func NewBuilder(queries ...string) *Builder

Creates a new query builder with a base query that is the conjunction of all queries passed

func (*Builder) And

func (qb *Builder) And(queryBuilders ...*Builder) *Builder

Creates the conjunction of Builder and rightQuery

func (*Builder) AndContains

func (qb *Builder) AndContains(tag string, operand interface{}) *Builder

func (*Builder) AndEquals

func (qb *Builder) AndEquals(tag string, operand interface{}) *Builder

Creates the conjunction of Builder and tag = operand

func (*Builder) AndGreaterThanOrEqual

func (qb *Builder) AndGreaterThanOrEqual(tag string, operand interface{}) *Builder

func (*Builder) AndLessThanOrEqual

func (qb *Builder) AndLessThanOrEqual(tag string, operand interface{}) *Builder

func (*Builder) AndStrictlyGreaterThan

func (qb *Builder) AndStrictlyGreaterThan(tag string, operand interface{}) *Builder

func (*Builder) AndStrictlyLessThan

func (qb *Builder) AndStrictlyLessThan(tag string, operand interface{}) *Builder

func (*Builder) Query

func (qb *Builder) Query() (pubsub.Query, error)

func (*Builder) String

func (qb *Builder) String() string

type Empty

type Empty query.Empty

Matches everything

func (Empty) Query

func (Empty) Query() (pubsub.Query, error)

type Query

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

A pre-parsed query

func Must

func Must(qry pubsub.Query, err error) Query

func WrapQuery

func WrapQuery(qry pubsub.Query) Query

func (Query) Query

func (q Query) Query() (pubsub.Query, error)

type Queryable

type Queryable interface {
	Query() (pubsub.Query, error)
}

func MatchAllQueryable

func MatchAllQueryable() Queryable

type String

type String string

A yet-to-parsed query

func (String) Query

func (qs String) Query() (pubsub.Query, error)

Jump to

Keyboard shortcuts

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