db

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ancestor

func Ancestor(ancestor *datastore.Key) *goloquent.Query

Ancestor :

func AnyOfAncestor

func AnyOfAncestor(ancestors ...*datastore.Key) *goloquent.Query

AnyOfAncestor :

func Connection

func Connection(driver string) *goloquent.DB

Connection :

func Create

func Create(ctx context.Context, model interface{}, parentKey ...*datastore.Key) error

Create :

func Delete

func Delete(ctx context.Context, model interface{}) error

Delete :

func Destroy

func Destroy(ctx context.Context, model interface{}) error

Destroy :

func DistinctOn

func DistinctOn(fields ...string) *goloquent.Query

DistinctOn :

func Exec

func Exec(ctx context.Context, stmt string, args ...interface{}) (sql.Result, error)

Exec :

func Find

func Find(ctx context.Context, key *datastore.Key, model interface{}) error

Find :

func First

func First(ctx context.Context, model interface{}) error

First :

func Get

func Get(ctx context.Context, model interface{}) error

Get :

func Limit

func Limit(limit int) *goloquent.Query

Limit :

func MatchAgainst

func MatchAgainst(fields []string, value ...string) *goloquent.Query

MatchAgainst :

func Migrate

func Migrate(ctx context.Context, model ...interface{}) error

Migrate :

func NewQuery

func NewQuery() *goloquent.Query

NewQuery :

func Offset

func Offset(offset int) *goloquent.Query

Offset :

func Omit

func Omit(fields ...string) goloquent.Replacer

Omit :

func Open

func Open(ctx context.Context, driver string, conf Config) (*goloquent.DB, error)

Open :

func OrderBy

func OrderBy(fields ...interface{}) *goloquent.Query

OrderBy :

func Paginate

func Paginate(ctx context.Context, p *goloquent.Pagination, model interface{}) error

Paginate :

func Query

func Query(ctx context.Context, stmt string, args ...interface{}) (*sql.Rows, error)

Query :

func RunInTransaction

func RunInTransaction(cb goloquent.TransactionHandler) error

RunInTransaction :

func Save

func Save(ctx context.Context, model interface{}) error

Save :

func Select

func Select(fields ...string) *goloquent.Query

Select :

func Table

func Table(name string) *goloquent.Table

Table :

func Truncate

func Truncate(ctx context.Context, model ...interface{}) error

Truncate :

func Unscoped

func Unscoped() *goloquent.Query

Unscoped :

func Upsert

func Upsert(ctx context.Context, model interface{}, parentKey ...*datastore.Key) error

Upsert :

func Where

func Where(field string, operator string, value interface{}) *goloquent.Query

Where :

func WhereEqual

func WhereEqual(field string, value interface{}) *goloquent.Query

WhereEqual :

func WhereJSON

func WhereJSON(field string, operator string, value interface{}) *goloquent.Query

WhereJSON :

func WhereNotEqual

func WhereNotEqual(field string, value interface{}) *goloquent.Query

WhereNotEqual :

func WhereNotNull

func WhereNotNull(field string) *goloquent.Query

WhereNotNull :

func WhereNull

func WhereNull(field string) *goloquent.Query

WhereNull :

Types

type Config

type Config struct {
	Username   string
	Password   string
	Host       string
	Port       string
	Database   string
	UnixSocket string
	TLSConfig  string
	CharSet    *goloquent.CharSet
	Logger     goloquent.LogHandler
	Native     goloquent.NativeHandler
}

Config :

Jump to

Keyboard shortcuts

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