option

package
v1.8.71 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2023 License: Zlib Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeMaxColumn = iota
	TypeFullSql
	TypeSqlColumnConvert
	TypeSubQuery
	TypeQuery
	TypeNameKey //子查询
)

Variables

This section is empty.

Functions

func Filter

func Filter(filter func(opt Option) bool, opts ...Option)

func FullSqlExist

func FullSqlExist(opts ...Option) bool

func MaxColumnExist

func MaxColumnExist(opts ...Option) int

func NameKeyExist

func NameKeyExist(opts ...Option) (string, bool)

func SubQueryExist

func SubQueryExist(opts ...Option) (string, bool)

Types

type FullSql

type FullSql bool

func (FullSql) String

func (t FullSql) String() string

func (FullSql) Type

func (t FullSql) Type() int

func (FullSql) Value

func (t FullSql) Value() interface{}

type MaxColumn

type MaxColumn int

func (MaxColumn) String

func (t MaxColumn) String() string

func (MaxColumn) Type

func (t MaxColumn) Type() int

func (MaxColumn) Value

func (t MaxColumn) Value() interface{}

type NameKey

type NameKey string

func (NameKey) String

func (t NameKey) String() string

func (NameKey) Type

func (t NameKey) Type() int

func (NameKey) Value

func (t NameKey) Value() interface{}

type Option

type Option interface {
	String() string
	Type() int
	Value() interface{}
}

func Exist added in v1.8.32

func Exist(ty int, opts ...Option) (Option, bool)

func SqlColumnConvert

func SqlColumnConvert(f func(col string) string) Option

func WithFullSQL

func WithFullSQL() Option

func WithMaxColumn

func WithMaxColumn(c int) Option

func WithNameKey

func WithNameKey(name string) Option

func WithQuery

func WithQuery() Option

func WithSubQuerySQL

func WithSubQuerySQL(as string) Option

type Query

type Query struct {
	Q map[string]interface{}
}

func QueryExist

func QueryExist(opts ...Option) *Query

func (Query) String

func (t Query) String() string

func (Query) Type

func (t Query) Type() int

func (Query) Value

func (t Query) Value() interface{}

type QueryFunc

type QueryFunc func(q *Query)

func (QueryFunc) Apply

func (f QueryFunc) Apply(q *Query)

type SqlColumnConvertFunc

type SqlColumnConvertFunc func(col string) string

func SqlColumnConvertExist

func SqlColumnConvertExist(opts ...Option) SqlColumnConvertFunc

func (SqlColumnConvertFunc) String

func (t SqlColumnConvertFunc) String() string

func (SqlColumnConvertFunc) Type

func (t SqlColumnConvertFunc) Type() int

func (SqlColumnConvertFunc) Value

func (t SqlColumnConvertFunc) Value() interface{}

type SubQuerySql

type SubQuerySql struct {
	As string
}

func (SubQuerySql) String

func (t SubQuerySql) String() string

func (SubQuerySql) Type

func (t SubQuerySql) Type() int

func (SubQuerySql) Value

func (t SubQuerySql) Value() interface{}

Jump to

Keyboard shortcuts

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