Documentation ¶
Index ¶
- Variables
- func CreatePgSql(opts ...*ConnectOption) *pg.DB
- type ConnectOption
- type PgSqlAdapter
- func (this *PgSqlAdapter) ExecSql(sql string, val ...interface{}) error
- func (this *PgSqlAdapter) GetDb() (*pg.DB, error)
- func (this *PgSqlAdapter) QueryBySql(outputRecords interface{}, sql string, val ...interface{}) error
- func (this *PgSqlAdapter) QueryOneBySql(outputRecord interface{}, sql string, val ...interface{}) error
- func (this *PgSqlAdapter) RegModel(m pkOrm.BaseModelInterface)
- func (this *PgSqlAdapter) SqlInArg(arg interface{}) interface{}
- func (this *PgSqlAdapter) SqlLimitStyle() string
- func (this *PgSqlAdapter) SqlReturnSql() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Db *pg.DB
Functions ¶
func CreatePgSql ¶
func CreatePgSql(opts ...*ConnectOption) *pg.DB
Types ¶
type ConnectOption ¶
type ConnectOption struct { User string Password string Database string SrvHost string SrvPort string }
func ConnectOptionFromProfile ¶
func ConnectOptionFromProfile() *ConnectOption
type PgSqlAdapter ¶
func (*PgSqlAdapter) ExecSql ¶
func (this *PgSqlAdapter) ExecSql(sql string, val ...interface{}) error
func (*PgSqlAdapter) QueryBySql ¶
func (this *PgSqlAdapter) QueryBySql(outputRecords interface{}, sql string, val ...interface{}) error
func (*PgSqlAdapter) QueryOneBySql ¶
func (this *PgSqlAdapter) QueryOneBySql(outputRecord interface{}, sql string, val ...interface{}) error
func (*PgSqlAdapter) RegModel ¶
func (this *PgSqlAdapter) RegModel(m pkOrm.BaseModelInterface)
func (*PgSqlAdapter) SqlInArg ¶
func (this *PgSqlAdapter) SqlInArg(arg interface{}) interface{}
func (*PgSqlAdapter) SqlLimitStyle ¶
func (this *PgSqlAdapter) SqlLimitStyle() string
func (*PgSqlAdapter) SqlReturnSql ¶
func (this *PgSqlAdapter) SqlReturnSql() string
Click to show internal directories.
Click to hide internal directories.