sql

package
v0.0.0-...-2413726 Latest Latest
Warning

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

Go to latest
Published: May 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitiailzedWriter

func InitiailzedWriter(config Config) (store.Writer, error)

InitiailzedWriter returns a Initiailzed sql writer

func Reader

func Reader(config Config) store.Reader

Reader returns a sql reader

func Writer

func Writer(config Config) store.Writer

Writer returns a sql writer

Types

type Config

type Config struct {
	// ConnectionString : When establishing a connection you are expected to supply a connection string containing zero or more parameters.
	// A subset of the connection parameters supported are :
	// dbname - The name of the database to connect to
	// user - The user to sign in as
	// password - The user's password
	// host - The host to connect to. Values that start with / are for unix
	// domain sockets. (default is localhost)
	// port - The port to bind to. (default is 5432)
	// sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)
	// fallback_application_name - An application_name to fall back to if one isn't provided.
	// connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.
	// sslcert - Cert file location. The file must contain PEM encoded data.
	// sslkey - Key file location. The file must contain PEM encoded data.
	// sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.
	ConnectionString      string
	Dialect               string
	Schema                string
	Table                 string
	Columns               []string
	MaxParallelConnection int
}

Config is a struct to hold all postgre configuration

func NewConfig

func NewConfig() *Config

NewConfig is a function to create configuration object

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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