orm

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var All = common.All
View Source
var Raw = common.Raw
View Source
var Sql = common.Sql

Functions

func Avg

func Avg(field ToSql) *fieldWrapper

func Between

func Between(field ToSql, val1, val2 any) *sqlWhereBuilder

func Count

func Count(field ToSql) *fieldWrapper

func CountAll added in v0.0.12

func CountAll() *fieldWrapper

func Eq

func Eq(field ToSql, val any) *sqlWhereBuilder

func Group

func Group(sql ToSql) *sqlWhereBuilder

func Gt

func Gt(field ToSql, val any) *sqlWhereBuilder

func GtEq

func GtEq(field ToSql, val any) *sqlWhereBuilder

func In

func In[T any](field ToSql, vals ...T) *sqlWhereBuilder

func Insert

func Insert(table ToSql) *insertSqlBuilder

func IsNotNull

func IsNotNull(field ToSql) *sqlWhereBuilder

func IsNull

func IsNull(field ToSql) *sqlWhereBuilder

func Le

func Le(field ToSql, val any) *sqlWhereBuilder

func LeEq

func LeEq(field ToSql, val any) *sqlWhereBuilder

func Like added in v0.0.13

func Like(field ToSql, val string) *sqlWhereBuilder

func Limit

func Limit(limit1 int, limit2 ...int) *sqlLimit

func Max

func Max(field ToSql) *fieldWrapper

func Min

func Min(field ToSql) *fieldWrapper

func NotEq

func NotEq(field ToSql, val any) *sqlWhereBuilder

func NotIn

func NotIn[T any](field ToSql, vals ...T) *sqlWhereBuilder

func Select

func Select(fields ...ToSql) *selectSqlBuilder

func Sum

func Sum(field ToSql) *fieldWrapper

func ToDbName added in v0.0.10

func ToDbName(fieldName string, gmodelTag string) string

func Update

func Update(table ToSql) *updateSqlBuilder

func WrapField

func WrapField(field ToSql) *fieldWrapper

Types

type Field

type Field = common.Field

func NewNameField

func NewNameField(field string) Field

type FieldMap

type FieldMap map[Field]any

func (FieldMap) ToSql

func (f FieldMap) ToSql(config common.ToSqlConfig) (string, []any)

type SetInfo

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

func (*SetInfo) ToSql

func (s *SetInfo) ToSql(config common.ToSqlConfig) (string, []any)

type ToSql

type ToSql = common.ToSql

func Asc

func Asc(fields ...Field) ToSql

func Desc

func Desc(fields ...Field) ToSql

Jump to

Keyboard shortcuts

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