pqsql

package
v0.0.0-...-2e9e358 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 18, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

type PgSqlAdapter struct {
	Db *pg.DB
}

func (*PgSqlAdapter) ExecSql

func (this *PgSqlAdapter) ExecSql(sql string, val ...interface{}) error

func (*PgSqlAdapter) GetDb

func (this *PgSqlAdapter) GetDb() (*pg.DB, 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL