postgres

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Array_Scan added in v0.2.2

func Array_Scan(src interface{}, dest interface{}) error

func Array_Value added in v0.2.2

func Array_Value(v interface{}) (driver.Value, error)

func CreateSchema added in v0.2.2

func CreateSchema(db *sql.DB, schema string) error

func InitializeHSTORE added in v0.5.1

func InitializeHSTORE(db *sql.DB, schema ...string) error

func InitializeUUID added in v0.5.1

func InitializeUUID(db *sql.DB, schema ...string) error

func JsonbScan added in v0.5.1

func JsonbScan(dest interface{}, src interface{}) error

func JsonbValue added in v0.5.1

func JsonbValue(obj interface{}) (driver.Value, error)

Types

type BigIntegerArray added in v0.2.2

type BigIntegerArray []int64

func (BigIntegerArray) Declare added in v0.2.2

func (h BigIntegerArray) Declare(props xql.PropertySet) string

func (*BigIntegerArray) Scan added in v0.2.2

func (p *BigIntegerArray) Scan(src interface{}) error

func (BigIntegerArray) Value added in v0.2.2

func (p BigIntegerArray) Value() (driver.Value, error)

type BoolArray

type BoolArray []bool

func (BoolArray) Declare added in v0.2.2

func (h BoolArray) Declare(props xql.PropertySet) string

func (*BoolArray) Scan added in v0.2.2

func (p *BoolArray) Scan(src interface{}) error

func (BoolArray) Value added in v0.2.2

func (p BoolArray) Value() (driver.Value, error)

type DoubleArray added in v0.2.2

type DoubleArray []float64

func (DoubleArray) Declare added in v0.2.2

func (h DoubleArray) Declare(props xql.PropertySet) string

func (*DoubleArray) Scan added in v0.2.2

func (p *DoubleArray) Scan(src interface{}) error

func (DoubleArray) Value added in v0.2.2

func (p DoubleArray) Value() (driver.Value, error)

type Elemented added in v0.2.2

type Elemented interface {
	Elem2Strings() []string
	Strings2Elem(...string) error
}

type HSTORE

type HSTORE map[string]interface{}

func (HSTORE) Declare added in v0.2.2

func (h HSTORE) Declare(props xql.PropertySet) string

func (*HSTORE) Scan

func (h *HSTORE) Scan(value interface{}) error

Scan implements the Scanner interface.

Note h.Map is reallocated before the scan to clear existing values. If the hstore column's database value is NULL, then h.Map is set to nil instead.

func (HSTORE) Value

func (h HSTORE) Value() (driver.Value, error)

Value implements the driver Valuer interface. Note if h.Map is nil, the database column value will be set to NULL.

type IntegerArray

type IntegerArray []int

func (IntegerArray) Declare added in v0.2.2

func (h IntegerArray) Declare(props xql.PropertySet) string

func (*IntegerArray) Scan added in v0.2.2

func (p *IntegerArray) Scan(src interface{}) error

func (IntegerArray) Value added in v0.2.2

func (p IntegerArray) Value() (driver.Value, error)

type JSON added in v0.2.2

type JSON struct {
}

func (JSON) Declare added in v0.2.2

func (j JSON) Declare(props xql.PropertySet) string

func (*JSON) Scan added in v0.2.2

func (j *JSON) Scan(value interface{}) error

func (JSON) Value added in v0.2.2

func (j JSON) Value() (driver.Value, error)

type JSONB added in v0.2.2

type JSONB JSON

func (JSONB) Declare added in v0.2.2

func (j JSONB) Declare(props xql.PropertySet) string

func (*JSONB) Scan added in v0.2.2

func (j *JSONB) Scan(value interface{}) error

func (JSONB) Value added in v0.2.2

func (j JSONB) Value() (driver.Value, error)

type PostgresDialect

type PostgresDialect struct {
}

func (PostgresDialect) Create

func (pb PostgresDialect) Create(t *xql.Table, options ...interface{}) (s string, args []interface{}, err error)

Create Implement the IDialect interface for creating table.

func (PostgresDialect) Delete

func (pb PostgresDialect) Delete(t *xql.Table, filters []xql.QueryFilter) (s string, args []interface{}, err error)

Delete Implement the IDialect interface to generate DELETE statement

func (PostgresDialect) Drop added in v0.2.1

func (pb PostgresDialect) Drop(t *xql.Table, force bool) (stm string, args []interface{}, err error)

Drop Implement the IDialect interface for generate DROP statement

func (PostgresDialect) Insert

func (pb PostgresDialect) Insert(t *xql.Table, obj interface{}, col ...string) (s string, args []interface{}, err error)

Insert Implement the IDialect interface to generate insert statement

func (PostgresDialect) InsertWithInsertedId added in v0.2.11

func (pb PostgresDialect) InsertWithInsertedId(t *xql.Table, obj interface{}, insertedId string, col ...string) (s string, args []interface{}, err error)

Insert Implement the IDialect interface to generate insert statement

func (PostgresDialect) Select

func (pb PostgresDialect) Select(t *xql.Table, cols []xql.QueryColumn, filters []xql.QueryFilter, orders []xql.QueryOrder, lockFor string, offset int64, limit int64) (s string, args []interface{}, err error)

Select Implement the IDialect interface for select values.

func (PostgresDialect) Update

func (pb PostgresDialect) Update(t *xql.Table, filters []xql.QueryFilter, cols ...xql.UpdateColumn) (s string, args []interface{}, err error)

Update Implement the IDialect interface to generate UPDATE statement

type RealArray added in v0.2.2

type RealArray []float32

func (RealArray) Declare added in v0.2.2

func (h RealArray) Declare(props xql.PropertySet) string

func (*RealArray) Scan added in v0.2.2

func (p *RealArray) Scan(src interface{}) error

func (RealArray) Value added in v0.2.2

func (p RealArray) Value() (driver.Value, error)

type SmallIntegerArray

type SmallIntegerArray []int16

func (SmallIntegerArray) Declare added in v0.2.2

func (h SmallIntegerArray) Declare(props xql.PropertySet) string

func (*SmallIntegerArray) Scan added in v0.2.2

func (p *SmallIntegerArray) Scan(src interface{}) error

func (SmallIntegerArray) Value added in v0.2.2

func (p SmallIntegerArray) Value() (driver.Value, error)

type StringArray

type StringArray []string

func (StringArray) Declare added in v0.2.2

func (h StringArray) Declare(props xql.PropertySet) string

func (*StringArray) Scan

func (p *StringArray) Scan(src interface{}) error

func (StringArray) Value

func (p StringArray) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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