Documentation ¶
Index ¶
- Constants
- Variables
- func CloseDb()
- func CloseSession()
- func DB() *orm.DataContext
- func DBRealtime() dbox.IConnection
- func DBSession() *mgo.Session
- func Delete(o orm.IModel) error
- func Find(o orm.IModel, filter *dbox.Filter, config toolkit.M) (dbox.ICursor, error)
- func Get(o orm.IModel, id interface{}) error
- func GetConfig(key string, args ...string) interface{}
- func GetConnectionInfo(db_type string) (string, *dbox.ConnectionInfo)
- func GetData(o orm.IModel, id interface{}) error
- func InitialSetDatabase() error
- func PrepareConnection(db_type string) (conn dbox.IConnection, err error)
- func Query(driver string, host string, other ...interface{}) *queryWrapper
- func Save(o orm.IModel) error
- func SetDb(conn dbox.IConnection) error
- func SetDbRealTime(conn dbox.IConnection) error
- func SetSession(conn dbox.IConnection) (e error)
- type Configuration
- type MetaSave
Constants ¶
View Source
const ( CONF_DB_ACL string = "db_acl" CONF_DB_OSTRO string = "db_ostro" CONF_DB_REALTIME string = "db_realtime" CONF_DB_REPORTING string = "db_reporting" )
Variables ¶
View Source
var ConfigPath string
Functions ¶
func CloseSession ¶
func CloseSession()
func DB ¶
func DB() *orm.DataContext
func DBRealtime ¶
func DBRealtime() dbox.IConnection
func GetConnectionInfo ¶
func GetConnectionInfo(db_type string) (string, *dbox.ConnectionInfo)
func InitialSetDatabase ¶
func InitialSetDatabase() error
func PrepareConnection ¶
func PrepareConnection(db_type string) (conn dbox.IConnection, err error)
func SetDb ¶
func SetDb(conn dbox.IConnection) error
func SetDbRealTime ¶
func SetDbRealTime(conn dbox.IConnection) error
func SetSession ¶
func SetSession(conn dbox.IConnection) (e error)
Types ¶
type Configuration ¶
func (*Configuration) GetPort ¶
func (p *Configuration) GetPort() (int, error)
func (*Configuration) RecordID ¶
func (a *Configuration) RecordID() interface{}
func (*Configuration) TableName ¶
func (a *Configuration) TableName() string
Click to show internal directories.
Click to hide internal directories.