Documentation ¶
Index ¶
- type DBConn
- type DBQuery
- type DBQueryRow
- type DBQueryRows
- type DBTransaction
- type FileProviderAPI
- type FileProviderPool
- type SqlBuilderOrderBy
- type SqlBuilderPager
- type SqlBuilderPart
- type SqlBuilderPartFunc
- type SqlBuilderSelect
- type SqlBuilderSet
- type SqlBuilderUpdate
- type SqlBuilderWhere
- type SqlSelectParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConn ¶ added in v0.6.0
type DBConn interface { Begin(ctx context.Context) (DBTransaction, error) DBQuery }
type DBQueryRow ¶ added in v0.6.0
type DBQueryRows ¶ added in v0.6.0
type DBTransaction ¶ added in v0.6.0
type FileProviderAPI ¶ added in v0.6.0
type FileProviderPool ¶ added in v0.6.5
type FileProviderPool struct {
// contains filtered or unexported fields
}
func NewFileProviderPool ¶ added in v0.6.5
func NewFileProviderPool() *FileProviderPool
func (*FileProviderPool) Provider ¶ added in v0.6.5
func (p *FileProviderPool) Provider(name string) (FileProviderAPI, error)
func (*FileProviderPool) Register ¶ added in v0.6.5
func (p *FileProviderPool) Register(name string, provider FileProviderAPI) error
type SqlBuilderOrderBy ¶ added in v0.5.0
type SqlBuilderOrderBy interface { WrapWithDefault(field SqlBuilderPartFunc) SqlBuilderPartFunc Join(fields ...SqlBuilderPartFunc) SqlBuilderPartFunc Field(name string, direction mrenum.SortDirection) SqlBuilderPartFunc }
type SqlBuilderPager ¶ added in v0.5.0
type SqlBuilderPager interface {
OffsetLimit(index, size uint64) SqlBuilderPartFunc
}
type SqlBuilderPart ¶ added in v0.5.0
type SqlBuilderPart interface { WithPrefix(value string) SqlBuilderPart Param(number int) SqlBuilderPart Empty() bool ToSql() (string, []any) fmt.Stringer }
type SqlBuilderPartFunc ¶ added in v0.5.0
func SqlBuilderPartFuncRemoveNil ¶ added in v0.5.0
func SqlBuilderPartFuncRemoveNil(parts []SqlBuilderPartFunc) []SqlBuilderPartFunc
type SqlBuilderSelect ¶ added in v0.5.0
type SqlBuilderSelect interface { Where(f func(w SqlBuilderWhere) SqlBuilderPartFunc) SqlBuilderPart OrderBy(f func(o SqlBuilderOrderBy) SqlBuilderPartFunc) SqlBuilderPart Pager(f func(p SqlBuilderPager) SqlBuilderPartFunc) SqlBuilderPart }
type SqlBuilderSet ¶ added in v0.5.0
type SqlBuilderSet interface { Join(fields ...SqlBuilderPartFunc) SqlBuilderPartFunc Field(name string, value any) SqlBuilderPartFunc Fields(names []string, args []any) SqlBuilderPartFunc }
type SqlBuilderUpdate ¶ added in v0.5.0
type SqlBuilderUpdate interface { Set(f func(s SqlBuilderSet) SqlBuilderPartFunc) SqlBuilderPart SetFromEntity(entity any) (SqlBuilderPart, error) SetFromEntityWith(entity any, extFields func(s SqlBuilderSet) SqlBuilderPartFunc) (SqlBuilderPart, error) }
type SqlBuilderWhere ¶ added in v0.5.0
type SqlBuilderWhere interface { JoinAnd(conds ...SqlBuilderPartFunc) SqlBuilderPartFunc JoinOr(conds ...SqlBuilderPartFunc) SqlBuilderPartFunc Expr(expr string) SqlBuilderPartFunc ExprWithValue(expr string, value any) SqlBuilderPartFunc Equal(name string, value any) SqlBuilderPartFunc NotEqual(name string, value any) SqlBuilderPartFunc Less(name string, value any) SqlBuilderPartFunc LessOrEqual(name string, value any) SqlBuilderPartFunc Greater(name string, value any) SqlBuilderPartFunc GreaterOrEqual(name string, value any) SqlBuilderPartFunc FilterEqualString(name, value string) SqlBuilderPartFunc FilterEqualInt64(name string, value, empty int64) SqlBuilderPartFunc FilterEqualBool(name string, value *bool) SqlBuilderPartFunc FilterLike(name, value string) SqlBuilderPartFunc FilterLikeFields(names []string, value string) SqlBuilderPartFunc FilterRangeInt64(name string, value mrtype.RangeInt64, empty int64) SqlBuilderPartFunc // FilterAnyOf - 'values' support only slices else the func returns nil FilterAnyOf(name string, values any) SqlBuilderPartFunc }
type SqlSelectParams ¶ added in v0.5.0
type SqlSelectParams struct { Where SqlBuilderPart OrderBy SqlBuilderPart Pager SqlBuilderPart }
Click to show internal directories.
Click to hide internal directories.