Documentation ¶
Index ¶
- Constants
- func GetColumnList(m interface{}) []string
- func GetTable(m interface{}) string
- func PostgrestRequestBind(ctx raiden.Context, method string, url string, payload []byte, ...) (*fasthttp.Response, error)
- func SliceToStringSlice(slice interface{}) []string
- type CountOptions
- type ModelBase
- type Query
- func (q *Query) AsSystem() *Query
- func (q *Query) Avg(column string, alias string) *Query
- func (q *Query) Count(opts ...CountOptions) (int, error)
- func (q *Query) Delete() error
- func (q *Query) Eq(column string, value any) *Query
- func (q *Query) From(m interface{}) *Query
- func (q Query) Get(collection interface{}) error
- func (q Query) GetUrl() string
- func (q *Query) Gt(column string, value int) *Query
- func (q *Query) Gte(column string, value any) *Query
- func (q *Query) HasError() bool
- func (q *Query) Ilike(column string, value string) *Query
- func (q *Query) In(column string, value any) *Query
- func (q *Query) Insert(payload interface{}, model interface{}) error
- func (q *Query) Like(column string, value string) *Query
- func (q *Query) Limit(value int) *Query
- func (q *Query) Lt(column string, value any) *Query
- func (q *Query) Lte(column string, value any) *Query
- func (q *Query) Max(column string, alias string) *Query
- func (q *Query) Min(column string, alias string) *Query
- func (q *Query) Model(m interface{}) *Query
- func (q *Query) Neq(column string, value any) *Query
- func (q *Query) Offset(value int) *Query
- func (q *Query) OrEq(column string, value any) *Query
- func (q *Query) OrGt(column string, value int) *Query
- func (q *Query) OrGte(column string, value any) *Query
- func (q *Query) OrIlike(column string, value string) *Query
- func (q *Query) OrIn(column string, value any) *Query
- func (q *Query) OrLike(column string, value string) *Query
- func (q *Query) OrLt(column string, value any) *Query
- func (q *Query) OrLte(column string, value any) *Query
- func (q *Query) OrNeq(column string, value any) *Query
- func (q *Query) OrderAsc(column string) *Query
- func (q *Query) OrderDesc(column string) *Query
- func (q *Query) Preload(table string, args ...string) *Query
- func (q Query) Select(columns []string) (model *Query)
- func (q Query) Single(model interface{}) error
- func (q *Query) Sum(column string, alias string) *Query
- func (q *Query) Update(p interface{}, model interface{}) error
- func (q *Query) Upsert(payload []interface{}, opt UpsertOptions) error
- type UpsertOptions
Constants ¶
View Source
const ( MergeDuplicates = "merge-duplicates" IgnoreDuplicates = "ignore-duplicates" )
Variables ¶
This section is empty.
Functions ¶
func GetColumnList ¶
func GetColumnList(m interface{}) []string
func PostgrestRequestBind ¶
func SliceToStringSlice ¶
func SliceToStringSlice(slice interface{}) []string
Types ¶
type CountOptions ¶
type CountOptions struct {
Count string
}
type Query ¶
type Query struct { Context raiden.Context Columns []string Relations []string WhereAndList *[]string WhereOrList *[]string OrderList *[]string LimitValue int OffsetValue int Errors []error ByPass bool // contains filtered or unexported fields }
func (*Query) Upsert ¶
func (q *Query) Upsert(payload []interface{}, opt UpsertOptions) error
type UpsertOptions ¶
type UpsertOptions = struct {
OnConflict string
}
Click to show internal directories.
Click to hide internal directories.