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 { List(filter exp.Expression, options ...option.Option) (Iterator, error) Load(filter exp.Expression, target Object) error Save(object Object, note string) error Delete(object Object, note string) error HardDelete(object Object) 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 // IsNew returns TRUE if the object has not yet been saved to the database IsNew() 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) // Get implements the path.Getter interface. // It returns a value stored in the object. // Dotted values reference sub-objects. GetPath(string) (interface{}, bool) // SetPath implements the path.Setter interface. // It applies a value to the object's properties. // Dotted values reference sub-objects. SetPath(string, interface{}) error }
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