store

package
v0.0.0-...-b4339e2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrKeyNotFound = ""
)
View Source
const LogLevel = 7

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigPostgreSql

type ConfigPostgreSql struct {
	Connection string
}

type IClient

type IClient interface {
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
	Prepare(query string) (*sql.Stmt, error)
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	Exec(query string, args ...interface{}) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
	QueryRow(query string, args ...interface{}) *sql.Row
}

type IDB

type IDB interface {
	IClient
	PingContext(ctx context.Context) error
	Ping() error
	Close() error
	SetMaxIdleConns(n int)
	SetMaxOpenConns(n int)
	SetConnMaxLifetime(d time.Duration)
	Stats() sql.DBStats
	BeginTx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)
	Begin() (*sql.Tx, error)
	Driver() driver.Driver
}

type NullBool

type NullBool struct {
	sql.NullBool
}

type NullFloat64

type NullFloat64 struct {
	sql.NullFloat64
}

type NullInt64

type NullInt64 struct {
	sql.NullInt64
}

type NullString

type NullString struct {
	sql.NullString
}

func (NullString) MarshalJSON

func (ns NullString) MarshalJSON() ([]byte, error)

func (NullString) UnmarshalJSON

func (ns NullString) UnmarshalJSON(v interface{}) error

type NullStringArray

type NullStringArray struct {
	Slice []string
	Valid bool // Valid is true if array string is not NULL
}

func (*NullStringArray) Scan

func (nsa *NullStringArray) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullStringArray) Value

func (nsa NullStringArray) Value() (driver.Value, error)

Value implements the driver Valuer interface.

type NullTime

type NullTime struct {
	Time  time.Time
	Valid bool // Valid is true if Time is not NULL
}

func (*NullTime) Scan

func (nt *NullTime) Scan(value interface{}) error

Scan implements the Scanner interface.

func (NullTime) Value

func (nt NullTime) Value() (driver.Value, error)

Value implements the driver Valuer interface.

Jump to

Keyboard shortcuts

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