Documentation
¶
Index ¶
Constants ¶
View Source
const ( MONGO = ftypes.DBTypes(1) MYSQL = ftypes.DBTypes(2) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { Paginate(interface{}, ...queryoptions.FindOptions) RegisterSchema() // New methods for bulk operations. FindMany(interface{}) CreateMany([]interface{}) UpdateMany([]interface{}) DeleteMany(ftypes.QMap) // contains filtered or unexported methods }
Define an interface for query operations.
type MongoConnection ¶
type MongoConnection interface { Connection // Deconstructs an array field and generates a separate document for each element in the array. Table(tableName string) MongoConnection Where(interface{}) MongoConnection Skip(skip int64) MongoConnection Limit(limit int64) MongoConnection Sort(sortKey string, sortdesc ...bool) MongoConnection Project(keys map[string]bool) MongoConnection }
Define a separate interface for MongoDB-specific queries.
type SQLConnection ¶
type SQLConnection interface { Connection ExecuteSQL(sql string, args ...interface{}) error Where(interface{}) SQLConnection Table(tableName string) SQLConnection GroupBy(fieldname string) SQLConnection Having(conditions interface{}) SQLConnection Skip(skip int64) SQLConnection Limit(limit int64) SQLConnection Sort(sortKey string, sortdesc ...bool) SQLConnection Project(keys map[string]bool) SQLConnection Join(join joins.Join) SQLConnection }
Click to show internal directories.
Click to hide internal directories.