postgres

package
v0.0.0-...-c728838 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2017 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const MAX_COLUMNS_TO_ADD = 20

Variables

View Source
var MISSING_COLUMN_REGEXP = regexp.MustCompile(
	`pq: column "([^"]*)" of relation "([^"]*)" does not exist`)

Functions

func QuoteString

func QuoteString(input string) string

func ValidateOptions

func ValidateOptions(options *Options)

Types

type Connection

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

func NewConnection

func NewConnection(opts *Options, configPath string) *Connection

func (*Connection) CreateTable

func (conn *Connection) CreateTable()

func (*Connection) InsertMaps

func (conn *Connection) InsertMaps(maps []map[string]interface{})

func (*Connection) QueryForLastTimestamp

func (conn *Connection) QueryForLastTimestamp(whereClause string) time.Time

type Options

type Options struct {
	Hostname     *string
	Port         *string
	SslMode      *string
	Username     *string
	Password     *string
	DatabaseName string
	TableName    string
}

Jump to

Keyboard shortcuts

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