Documentation
¶
Overview ¶
Package data provides a data structure for defining simple database filters. This is not able to represent every imaginable query criteria, but it does a good job of making common criteria simple to format and pass around in your application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Channel ¶ added in v0.24.0
Channel converts an Iterator into a channel of items. You must include a constructor function that generates fully initialized values of the type you want to return.
func ChannelWithCancel ¶ added in v0.24.0
Channel converts an Iterator into a channel of items. You must include a constructor function that generates fully initialized values of the type you want to return.
Types ¶
type Collection ¶ added in v0.3.8
type Collection interface { List(filter exp.Expression, options ...option.Option) (Iterator, error) Query(target any, filter exp.Expression, options ...option.Option) error Load(filter exp.Expression, target Object) error Save(object Object, note string) error Delete(object Object, note string) error HardDelete(filter exp.Expression) error }
Collection represents a single database collection (or table) that is opened to support a single transactional request, and then closed when this transaction is complete
type Iterator ¶ added in v0.2.5
Iterator interface allows callers to iterator over a large number of items in an array/slice
type Object ¶
type Object interface { // ID returns the primary key of the object ID() string // Unix epoch time when this object was created Created() int64 // Unix epoch time when this object was updated Updated() int64 // IsNew returns TRUE if the object has not yet been saved to the database IsNew() bool // IsDeleted returns TRUE if the object has been virtually deleted IsDeleted() bool // SetCreated stamps the CreateDate and UpdateDate of the object, and makes a note SetCreated(comment string) // SetUpdated stamps the UpdateDate of the object, and makes a note SetUpdated(comment string) // SetDeleted marks the object virtually "deleted", and makes a note SetDeleted(comment string) // ETag returns the signature or revision number of the object ETag() string }
Object interface defines all of the methods that a Domain Object must provide to Presto
type Server ¶ added in v0.3.6
Server is an abstract representation of a database and its connection information.
type Session ¶
type Session interface { Collection(collection string) Collection Close() }
Session represents a single database session, that is opened to support a single transactional request, and then closed when this transaction is complete