Documentation ¶
Index ¶
- Variables
- func Each(v any, cb func(v reflect.Value, pointer bool) error) error
- func EachField(v reflect.Value, cb func(sf reflect.StructField, fv reflect.Value) error) error
- func FieldName(f reflect.StructField) string
- func GetValue(v any, key string) (any, bool)
- func HasField(v any, field string) bool
- func Includes[T comparable](arr []T, v T) bool
- func PrimaryKey(m any) []string
- func RGetValue(rv reflect.Value, key string) (any, bool)
- type PrimaryKeyer
- type QueryExecer
- type SQLResult
- type Tag
- type ToSQLFunc
- type ToSQLer
- func Concat(sqlers ...ToSQLer) ToSQLer
- func Group(sqler ToSQLer) ToSQLer
- func Identifier(i string) ToSQLer
- func IdentifierList(strs []string) []ToSQLer
- func Join[T ToSQLer](sqlers []T, sep string) ToSQLer
- func Literal(v any) ToSQLer
- func LiteralList(values []any) []ToSQLer
- func Raw(sql string, bindings ...any) ToSQLer
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrExpectedStruct = fmt.Errorf("expected a struct")
)
Functions ¶
func FieldName ¶
func FieldName(f reflect.StructField) string
func Includes ¶
func Includes[T comparable](arr []T, v T) bool
func PrimaryKey ¶
Types ¶
type PrimaryKeyer ¶
type PrimaryKeyer interface {
PrimaryKey() []string
}
type QueryExecer ¶
type QueryExecer interface { sqlx.QueryerContext sqlx.ExecerContext }
type Tag ¶
type Tag struct { Name string Primary bool AutoIncrement bool Readonly bool Index bool Unique bool Type dialects.DataType }
func DBTag ¶
func DBTag(f reflect.StructField) *Tag
Click to show internal directories.
Click to hide internal directories.