example

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeywordIsNull     = "IS NULL"
	KeywordIsNotNull  = "IS NOT NULL"
	KeywordIn         = "IN"
	KeywordNotIn      = "NOT IN"
	KeywordLike       = "LIKE"
	KeywordNotLike    = "NOT LIKE"
	KeywordBetween    = "BETWEEN"
	KeywordNotBetween = "NOT BETWEEN"
	KeywordAnd        = "AND"
	KeywordOr         = "OR"
)
View Source
const (
	KeywordEqual      = "="
	KeywordNotEqual   = "<>"
	KeywordGreater    = ">"
	KeywordNotGreater = "<="
	KeywordLess       = "<"
	KeywordNotLess    = ">="
)
View Source
const (
	Placeholder        = "?"
	PlaceholderString  = "?"
	PlaceholderNumeric = "?"
)
View Source
const (
	KeywordOrderBy = "ORDER BY"
)

Variables

This section is empty.

Functions

func NewExample

func NewExample() *example

Types

type Criteria

type Criteria interface {
	AndIsNull(field string) Criteria
	AndIsNotNull(field string) Criteria
	AndEqualTo(field string, value interface{}) Criteria
	AndNotEqualTo(field string, value interface{}) Criteria
	AndGreaterThan(field string, value interface{}) Criteria
	AndNotGreaterThan(field string, value interface{}) Criteria
	AndLessThan(field string, value interface{}) Criteria
	AndNotLessThan(field string, value interface{}) Criteria
	AndIn(field string, list ...interface{}) Criteria
	AndNotIn(field string, list ...interface{}) Criteria
	AndLike(field string, value interface{}) Criteria
	AndNotLike(field string, value interface{}) Criteria
	AndBetween(field string, value1, value2 interface{}) Criteria
	AndNotBetween(field string, value1, value2 interface{}) Criteria

	OrIsNull(field string) Criteria
	OrIsNotNull(field string) Criteria
	OrEqualTo(field string, value interface{}) Criteria
	OrNotEqualTo(field string, value interface{}) Criteria
	OrGreaterThan(field string, value interface{}) Criteria
	OrNotGreaterThan(field string, value interface{}) Criteria
	OrLessThan(field string, value interface{}) Criteria
	OrNotLessThan(field string, value interface{}) Criteria
	OrIn(field string, list ...interface{}) Criteria
	OrNotIn(field string, list ...interface{}) Criteria
	OrLike(field string, value interface{}) Criteria
	OrNotLike(field string, value interface{}) Criteria
	OrBetween(field string, value1, value2 interface{}) Criteria
	OrNotBetween(field string, value1, value2 interface{}) Criteria

	Raw() (string, []interface{})
}

type Example

type Example interface {
	CreateCriteria() Criteria
	Or(criteria Criteria) Example
	And(criteria Criteria) Example
	OrderBy(order string) Example
	Distinct(d bool) Example
	Explain() (string, []interface{})
	String() string
}

Jump to

Keyboard shortcuts

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