suparest

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MergeDuplicates  = "merge-duplicates"
	IgnoreDuplicates = "ignore-duplicates"
)

Variables

This section is empty.

Functions

func GetTable

func GetTable(m interface{}) string

func PostgrestRequest

func PostgrestRequest(ctx raiden.Context, method string, url string, payload []byte, headers map[string]string) ([]byte, *fasthttp.Response, error)

func SliceToStringSlice

func SliceToStringSlice(slice interface{}) []string

Types

type CountOptions

type CountOptions struct {
	Count string
}

type ModelBase

type ModelBase struct {
	raiden.ModelBase
}

func (*ModelBase) Execute

func (m *ModelBase) Execute() (model *ModelBase)

func (ModelBase) ForceDelete

func (m ModelBase) ForceDelete() (model ModelBase)

func (ModelBase) GetTable deprecated

func (m ModelBase) GetTable() string

Deprecated: Will be removed

func (*ModelBase) NewQuery deprecated

func (m *ModelBase) NewQuery() *Query

Deprecated: Will be removed

type Query

type Query struct {
	Context raiden.Context

	UseWhere    int
	Columns     []string
	EqList      *[]string
	NeqList     *[]string
	OrList      *[]string
	InList      *[]string
	LtList      *[]string
	LteList     *[]string
	GtList      *[]string
	GteList     *[]string
	LikeList    *[]string
	IlikeList   *[]string
	OrderList   *[]string
	LimitValue  int
	OffsetValue int
	Err         error
	// contains filtered or unexported fields
}

func NewQuery

func NewQuery(ctx raiden.Context) *Query

func (*Query) Count

func (q *Query) Count(opts ...CountOptions) (int, error)

func (*Query) Delete

func (q *Query) Delete() ([]byte, error)

func (*Query) Eq

func (q *Query) Eq(column string, value any) *Query

func (*Query) Error

func (q *Query) Error() error

func (Query) Get

func (q Query) Get() ([]byte, error)

func (Query) GetUrl

func (q Query) GetUrl() string

func (*Query) Gt

func (q *Query) Gt(column string, value int) *Query

func (*Query) Gte

func (q *Query) Gte(column string, value any) *Query

func (*Query) Ilike

func (q *Query) Ilike(column string, value string) *Query

func (*Query) In

func (q *Query) In(column string, value any) *Query

func (*Query) Insert

func (q *Query) Insert(payload interface{}) ([]byte, error)

func (*Query) Like

func (q *Query) Like(column string, value string) *Query

func (*Query) Limit

func (q *Query) Limit(value int) *Query

func (*Query) Lt

func (q *Query) Lt(column string, value any) *Query

func (*Query) Lte

func (q *Query) Lte(column string, value any) *Query

func (*Query) Model

func (q *Query) Model(m interface{}, relations []interface{}) *Query

func (*Query) Neq

func (q *Query) Neq(column string, value any) *Query

func (*Query) Offset

func (q *Query) Offset(value int) *Query

func (*Query) Or

func (q *Query) Or(column string, value any) *Query

func (*Query) OrderAsc

func (q *Query) OrderAsc(column string) *Query

func (*Query) OrderDesc

func (q *Query) OrderDesc(column string) *Query

func (Query) Select

func (q Query) Select(c ...string) (model *Query)

func (Query) Single

func (q Query) Single() ([]byte, error)

func (*Query) Update

func (q *Query) Update(p interface{}) ([]byte, error)

func (*Query) Upsert

func (q *Query) Upsert(payload []interface{}, opt UpsertOptions) ([]byte, error)

type UpsertOptions

type UpsertOptions = struct {
	OnConflict string
}

type Where

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

Jump to

Keyboard shortcuts

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