postgres

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2013 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PG_DB_EXECUTOR_VERBOSE = true
)
View Source
var PG_W_VERBOSE = true

Functions

func ColumnsSql

func ColumnsSql(table *Table) string

func GenericToPostgresType added in v0.4.3

func GenericToPostgresType(genericType *common.Type) string

func PostgresToGenericType added in v0.4.3

func PostgresToGenericType(postgresType string) string

func RawToPostgres added in v0.4.1

func RawToPostgres(val []byte, origType *common.Type) (string, error)

converts a RawBytes field into something you can * put into a regular insert statement (wrapping strings in $$ * et cetera)

Types

type PgDbExecutor added in v0.4.1

type PgDbExecutor struct {
	common.DbExecutor
	// contains filtered or unexported fields
}

func NewPgDbExecutor added in v0.4.1

func NewPgDbExecutor(db *sql.DB) (*PgDbExecutor, error)

func (*PgDbExecutor) BulkAddRecord added in v0.4.1

func (e *PgDbExecutor) BulkAddRecord(args ...interface{}) error

func (*PgDbExecutor) BulkFinish added in v0.4.1

func (e *PgDbExecutor) BulkFinish() error

func (*PgDbExecutor) BulkInit added in v0.4.1

func (e *PgDbExecutor) BulkInit(table string, columns ...string) error

func (*PgDbExecutor) HasCapability added in v0.4.1

func (e *PgDbExecutor) HasCapability(capability int) bool

type PostgresFileWriter

type PostgresFileWriter struct {
	// contains filtered or unexported fields
}

func NewPostgresFileWriter

func NewPostgresFileWriter(filename string) (*PostgresFileWriter, error)

func (*PostgresFileWriter) Close

func (w *PostgresFileWriter) Close() error

func (*PostgresFileWriter) MergeTable

func (w *PostgresFileWriter) MergeTable(src *Table, dstName string, r Reader) error

how to do an UPSERT/MERGE in PostgreSQL * http://stackoverflow.com/questions/17267417/how-do-i-do-an-upsert-merge-insert-on-duplicate-update-in-postgresq

type PostgresWriter

type PostgresWriter struct {
	// contains filtered or unexported fields
}

func NewPostgresWriter

func NewPostgresWriter(conf *Config) (*PostgresWriter, error)

func (*PostgresWriter) Close

func (w *PostgresWriter) Close() error

func (*PostgresWriter) MergeTable

func (w *PostgresWriter) MergeTable(src *Table, dstName string, r Reader) error

how to do an UPSERT/MERGE in PostgreSQL * http://stackoverflow.com/questions/17267417/how-do-i-do-an-upsert-merge-insert-on-duplicate-update-in-postgresq

Jump to

Keyboard shortcuts

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