psql

package
v0.0.0-...-a2c1972 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeferHandleTxn

func DeferHandleTxn(txn *sqlx.Tx)

func JsonListQuery

func JsonListQuery(q string) string

func JsonRowQuery

func JsonRowQuery(q string) string

func TransactionWithTimezone

func TransactionWithTimezone(db *sqlx.DB, tzHOffset int) (error, *sqlx.Tx)

Types

type DynamicSqlInsertSt

type DynamicSqlInsertSt struct {
	Table     string
	Fields    string
	Values    string
	Returning string
	Args      []interface{}
}

func (*DynamicSqlInsertSt) Query

func (ds *DynamicSqlInsertSt) Query() string

type DynamicSqlSelectSt

type DynamicSqlSelectSt struct {
	With       []DynamicSqlWithSt
	Select     string
	NeedRowNum bool
	From       string
	Where      string
	GroupBy    string
	OrderBy    string
	Offset     string
	Limit      string
	Args       []interface{}
}

func (*DynamicSqlSelectSt) Query

func (ds *DynamicSqlSelectSt) Query(json string) string

func (*DynamicSqlSelectSt) TotalCount

func (ds *DynamicSqlSelectSt) TotalCount() string

type DynamicSqlUpdateSt

type DynamicSqlUpdateSt struct {
	Table string
	Set   string
	Where string
	Args  []interface{}
}

func (*DynamicSqlUpdateSt) Query

func (ds *DynamicSqlUpdateSt) Query() string

type DynamicSqlWithSt

type DynamicSqlWithSt struct {
	Alias string
	Sql   *DynamicSqlSelectSt
}

Jump to

Keyboard shortcuts

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