orm

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2022 License: MIT Imports: 1 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB interface {
	Query
	Begin() (Transaction, error)
}

type Orm

type Orm interface {
	Connection(name string) Orm
	Query() DB
	Transaction(txFunc func(tx Transaction) error) error
	WithContext(ctx context.Context) Orm
}

type Query

type Query interface {
	Count(count *int64) error
	Create(value interface{}) error
	Delete(value interface{}, conds ...interface{}) error
	Distinct(args ...interface{}) Query
	Exec(sql string, values ...interface{}) error
	Find(dest interface{}, conds ...interface{}) error
	First(dest interface{}) error
	FirstOrCreate(dest interface{}, conds ...interface{}) error
	ForceDelete(value interface{}, conds ...interface{}) error
	Get(dest interface{}) error
	Group(name string) Query
	Having(query interface{}, args ...interface{}) Query
	Join(query string, args ...interface{}) Query
	Limit(limit int) Query
	Model(value interface{}) Query
	Offset(offset int) Query
	Order(value interface{}) Query
	OrWhere(query interface{}, args ...interface{}) Query
	Pluck(column string, dest interface{}) error
	Raw(sql string, values ...interface{}) Query
	Save(value interface{}) error
	Scan(dest interface{}) error
	Scopes(funcs ...func(Query) Query) Query
	Select(query interface{}, args ...interface{}) Query
	Table(name string, args ...interface{}) Query
	Update(column string, value interface{}) error
	Updates(values interface{}) error
	Where(query interface{}, args ...interface{}) Query
	WithTrashed() Query
}

type Transaction

type Transaction interface {
	Query
	Commit() error
	Rollback() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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