database

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(host, port, user, password, dbname, sslmode string) (*sql.DB, error)

Open creates and returns a client connection to a specified database.

Types

type Postgres

type Postgres struct {
}

func (Postgres) CurrentTimestamp

func (p Postgres) CurrentTimestamp() string

func (Postgres) EncodeStringConst

func (p Postgres) EncodeStringConst(s string) string

func (Postgres) JSONType

func (p Postgres) JSONType() string

func (Postgres) RedshiftKeys

func (p Postgres) RedshiftKeys(distkey string, sortkey string) string

func (Postgres) String

func (p Postgres) String() string

type Redshift

type Redshift struct {
}

func (Redshift) CurrentTimestamp

func (r Redshift) CurrentTimestamp() string

func (Redshift) EncodeStringConst

func (r Redshift) EncodeStringConst(s string) string

func (Redshift) JSONType

func (r Redshift) JSONType() string

func (Redshift) RedshiftKeys

func (r Redshift) RedshiftKeys(distkey string, sortkey string) string

func (Redshift) String

func (r Redshift) String() string

type System

type System interface {
	JSONType() string
	CurrentTimestamp() string
	EncodeStringConst(string) string
	RedshiftKeys(string, string) string
}

func SelectDBMSType

func SelectDBMSType(dbms string) (System, error)

Jump to

Keyboard shortcuts

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