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 ¶
This section is empty.
Types ¶
type Collection ¶ added in v0.3.8
type Collection interface { Count(criteria exp.Expression, options ...option.Option) (int64, error) Query(target any, criteria exp.Expression, options ...option.Option) error Iterator(criteria exp.Expression, options ...option.Option) (Iterator, error) Load(criteria exp.Expression, target Object) error Save(object Object, note string) error Delete(object Object, note string) error HardDelete(criteria 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 a data structure
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