storage

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInserted = errors.New("not inserted record to db")
View Source
var Select = squirrel.Select

Functions

This section is empty.

Types

type Alias

type Alias = db.Alias

Alias - alias for table.

type And

type And = squirrel.And

And - and pred.

type Argument

type Argument = db.Argument

Argument - anything ibj which have Valuer and Scan.

type Column

type Column = db.Column

Column - sql column name.

type Config

type Config struct {
	// todo in real world array of hosts or slaves or other // can use Consul hook
	Host                           string
	Port                           int
	Username                       string
	Password                       string
	Database                       string
	IsEnableValidationForRepoNames bool   `yaml:"IsEnableValidationForRepoNames"`
	IsEnableReposStructCache       bool   `yaml:"IsEnableReposStructCache"`
	Placeholder                    string `yaml:"placeholder"`
	MaxTryConnect                  int    `yaml:"maxTryConnect"`
	TimeoutTryConnect              string `yaml:"timeoutTryConnect"`
	Options                        Options
}

Config - config of storage.

func (Config) CustomConfig

func (c Config) CustomConfig() Config

func (Config) IsEnableReposCache

func (c Config) IsEnableReposCache() bool

func (Config) IsEnableValidationRepoNames

func (c Config) IsEnableValidationRepoNames() bool

func (Config) PlaceholderFormat

func (c Config) PlaceholderFormat() squirrel.PlaceholderFormat

type Connector

type Connector = db.Connector[CustomDbConfig]

Connector - instanced by Config type Connector generic interface

type CursorPaginationParams

type CursorPaginationParams = db.CursorPaginationParams

CursorPaginationParams alias of CursorPaginationParams.

type CustomDbConfig

type CustomDbConfig interface {
	db.Config
	CustomConfig() Config
}

type DTO

type DTO = db.DTO

DTO - data table object

type Eq

type Eq = squirrel.Eq

Eq - alias squirell.Eq

type Gt

type Gt = squirrel.Gt

Gt - and pred.

type Join

type Join = db.Join

Join - join part of query.

type Lt

type Lt = squirrel.Lt

Lt - and pred.

type Options

type Options map[string]any

Options - options config.

type Query

type Query = db.Query

Query - sql query string.

type Repository

type Repository = db.Repository

Repository - repository

type SelectBuilder

type SelectBuilder = db.SelectBuilder

SelectBuilder alias of squirrel.SelectBuilder.

type Storage

type Storage = _Storage[CustomDbConfig]

Storage - instanced by Config type Storage generic interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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