mrsql

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 10

Documentation

Index

Constants

View Source
const (
	ModelNameEntityMetaOrderBy = "EntityMetaOrderBy"
)
View Source
const (
	ModelNameEntityMetaUpdate = "EntityMetaUpdate"
)

Variables

This section is empty.

Functions

func MergeArgs

func MergeArgs(args ...[]any) []any

Types

type BuilderPart

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

func NewBuilderPart

func NewBuilderPart(body mrstorage.SqlBuilderPartFunc) *BuilderPart

func (*BuilderPart) Empty

func (b *BuilderPart) Empty() bool

func (*BuilderPart) Param

func (b *BuilderPart) Param(number int) mrstorage.SqlBuilderPart

func (*BuilderPart) String

func (b *BuilderPart) String() string

func (*BuilderPart) ToSql

func (b *BuilderPart) ToSql() (string, []any)

func (*BuilderPart) WithPrefix

func (b *BuilderPart) WithPrefix(value string) mrstorage.SqlBuilderPart

type BuilderSelect

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

type BuilderUpdate

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

func NewBuilderUpdate

func NewBuilderUpdate(set mrstorage.SqlBuilderSet) *BuilderUpdate

func NewBuilderUpdateWithMeta

func NewBuilderUpdateWithMeta(meta *EntityMetaUpdate, set mrstorage.SqlBuilderSet) *BuilderUpdate

func (*BuilderUpdate) SetFromEntity

func (b *BuilderUpdate) SetFromEntity(entity any) (mrstorage.SqlBuilderPart, error)

func (*BuilderUpdate) SetFromEntityWith added in v0.6.0

func (b *BuilderUpdate) SetFromEntityWith(entity any, extFields func(s mrstorage.SqlBuilderSet) mrstorage.SqlBuilderPartFunc) (mrstorage.SqlBuilderPart, error)

type EntityMetaOrderBy

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

func NewEntityMetaOrderBy

func NewEntityMetaOrderBy(entity any) (*EntityMetaOrderBy, error)

NewEntityMetaOrderBy - WARNING: use only when starting the main process

func (*EntityMetaOrderBy) CheckField added in v0.6.0

func (m *EntityMetaOrderBy) CheckField(name string) bool

func (*EntityMetaOrderBy) DefaultSort added in v0.6.0

func (m *EntityMetaOrderBy) DefaultSort() mrtype.SortParams

type EntityMetaUpdate

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

func NewEntityMetaUpdate

func NewEntityMetaUpdate(entity any) (*EntityMetaUpdate, error)

NewEntityMetaUpdate - WARNING: use only when starting the main process

func (*EntityMetaUpdate) FieldsForUpdate added in v0.6.0

func (m *EntityMetaUpdate) FieldsForUpdate(entity any) ([]string, []any, error)

Jump to

Keyboard shortcuts

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