sql

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 4 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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