db

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInsertable

func NewInsertable(collection gtly.Collection, indexer *Indexer, index map[string][]interface{}) toolbox.Ranger

NewInsertable creates an insertable collection

func NewKeySetter

func NewKeySetter(view *data.View) dsc.KeySetter

NewKeySetter creates a key setter

func Newupdatable

func Newupdatable(collection gtly.Collection, indexer *Indexer, index map[string][]interface{}) toolbox.Ranger

Newupdatable creates an updatable collection

Types

type Indexer

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

Indexer represents primary key indexer

func NewIndexer

func NewIndexer(view *data.View) *Indexer

NewIndexer creates an indexer

func (Indexer) Index

func (i Indexer) Index(collection gtly.Collection) map[string][]interface{}

func (Indexer) Key

func (i Indexer) Key(item *gtly.Object) (string, bool)

func (Indexer) Values

func (i Indexer) Values(item *gtly.Object) []interface{}

type Insert

type Insert struct {
	Query *metric.Query
	// contains filtered or unexported fields
}

func NewInsert

func NewInsert(view *data.View) *Insert

NewInsert creates a new insert

func (*Insert) DML

func (i *Insert) DML(item interface{}) *dsc.ParametrizedSQL

type Update

type Update struct {
	Queries []*metric.Query
	// contains filtered or unexported fields
}

func NewUpdate

func NewUpdate(view *data.View) *Update

NewInsert creates a new insert

func (*Update) DML

func (u *Update) DML(item interface{}) *dsc.ParametrizedSQL

Jump to

Keyboard shortcuts

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