postgres

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TypeTag

func TypeTag(dbType string) (string, error)

Types

type DB

type DB struct {
	*sqlx.DB
}

func Open

func Open(option *types.PostgresOpt) (*DB, error)

func OpenWith

func OpenWith(host, port, user, password, database string) (*DB, error)

func (*DB) Export

func (db *DB) Export(ctx context.Context, opt offline.ExportOpt) (<-chan *types.RawFeatureValueRecord, error)

func (*DB) Import

func (db *DB) Import(ctx context.Context, opt offline.ImportOpt) (int64, string, error)

func (*DB) Join

func (db *DB) Join(ctx context.Context, opt offline.JoinOpt) (dataMap map[string]dbutil.RowMap, err error)

func (*DB) LoadData

func (db *DB) LoadData(ctx context.Context, csvReader *csv.Reader, tableName string, header []string) error

func (*DB) TypeTag

func (db *DB) TypeTag(dbType string) (string, error)

Jump to

Keyboard shortcuts

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