sql

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OpEq          = "="
	OpIs          = "is"
	OpIsNot       = "is not"
	OpLike        = "~"
	OPMemberOf    = "MEMBER OF"
	OpNeq         = "!="
	OPNotMemberOf = "NOT MEMBER OF"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Groups  []Filter      `json:"groups"`
	Matches []FilterMatch `json:"matches"`
	Bool    string        `json:"bool"`
}

type FilterMatch

type FilterMatch struct {
	Values    []interface{} `json:"values"`
	Dimension string        `json:"dimension"`
	Operator  string        `json:"operator"`
}

type Input

type Input struct {
	Filter  Filter   `json:"filter"`
	GroupBy []string `json:"groupBy"`
	Order   []Order  `json:"order"`
	Page    *Page    `json:"page"`
}

func NewInput

func NewInput() *Input

type Order

type Order struct {
	Direction string `json:"direction"`
	Field     string `json:"field"`
}

type OrmQueryBuilder

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

func NewOrmQueryBuilder

func NewOrmQueryBuilder(metadata db_repo.Metadata) *OrmQueryBuilder

func (OrmQueryBuilder) Build

func (qb OrmQueryBuilder) Build(inp *Input) (*db_repo.QueryBuilder, error)

type Page

type Page struct {
	Limit  int `json:"limit"`
	Offset int `json:"offset"`
}

type RawQueryBuilder

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

func NewRawQueryBuilder

func NewRawQueryBuilder(metadata db_repo.Metadata) *RawQueryBuilder

func (RawQueryBuilder) Build

func (qb RawQueryBuilder) Build(inp *Input) (*db.RawQueryBuilder, error)

Jump to

Keyboard shortcuts

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