db

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2021 License: MIT Imports: 6 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(model interface{}, parentKey ...*datastore.Key) error

Create :

func Delete

func Delete(model interface{}) error

Delete :

func Destroy

func Destroy(model interface{}) error

Destroy :

func DistinctOn

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

DistinctOn :

func Exec

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

Exec :

func Find

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

Find :

func First

func First(model interface{}) error

First :

func Get

func Get(model interface{}) error

Get :

func Limit

func Limit(limit int) *goloquent.Query

Limit :

func MatchAgainst added in v0.5.0

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

MatchAgainst :

func Migrate

func Migrate(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(driver string, conf Config) (*goloquent.DB, error)

Open :

func OrderBy added in v0.3.0

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

OrderBy :

func Paginate

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

Paginate :

func Query

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

Query :

func RunInTransaction

func RunInTransaction(cb goloquent.TransactionHandler) error

RunInTransaction :

func Save

func Save(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(model ...interface{}) error

Truncate :

func Unscoped

func Unscoped() *goloquent.Query

Unscoped :

func Upsert

func Upsert(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
}

Config :

Jump to

Keyboard shortcuts

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