Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToFindOneOptions ¶
func ConvertToFindOneOptions(opts *Options) *options.FindOneOptions
convertToMongoOne converts database.Options to options.FindOneOptions
func ConvertToFindOptions ¶
func ConvertToFindOptions(opts *Options) *options.FindOptions
convertToFindOptions converts database.Options to options.FindOptions
func ConvertToMongoFilter ¶
convertToMongoFilter converts database.Filter to a bson.M document
Types ¶
type Database ¶
type Database interface { Open(ctx context.Context) error Close(ctx context.Context) error Insert(collection string, object interface{}) error FindOne(collection string, object interface{}, filter *Filter, opts *Options) error FindAll(collection string, object interface{}, filter *Filter, opts *Options) error Update(collection string, object interface{}, filter *Filter) error Upsert(collection string, object interface{}, filter *Filter) error Delete(collection string, filter *Filter) error Search(collection, search string, fields []string, slice interface{}) error }
Database defines database functionality
type Options ¶
type Options struct { Limit int64 Skip int64 Sort *SortOption }
func CreateOptions ¶
func CreateOptions() *Options
type SortOption ¶ added in v0.2.0
Click to show internal directories.
Click to hide internal directories.