gg_dbal_commons

package
v0.3.31 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CAT_PERSON   = "person"
	CAT_DOCUMENT = "document"
	CAT_ADV      = "adv"
	CAT_POST     = "post"
	CAT_EVENT    = "event"
)
View Source
const (
	DsnODBC = iota
	DsnFile
	DsnSTD
)

----------------------------------------------------------------------------------------------------------------------

t y p e s

----------------------------------------------------------------------------------------------------------------------

Variables

View Source
var (
	ErrorInvalidDsn                    = errors.New("invalid_dsn")
	ErrorDriverNotImplemented          = errors.New("driver_not_implemented")
	ErrorDatabaseDoesNotExists         = errors.New("database_does_not_exists")
	ErrorCollectionDoesNotExists       = errors.New("collection_does_not_exists")
	ErrorMismatchConfiguration         = errors.New("mismatch_configuration")
	ErrorMissingTransactionOptions     = errors.New("missing_transaction_options")
	ErrorMissingTransactionCollections = errors.New("missing_transaction_collections")
	ErrorCommandAndParamsDoNotMatch    = errors.New("commands_and_params_do_not_match")

	ErrorEngineNotReady      = errors.New("engine_not_ready")
	ErrorCommandNotSupported = errors.New("command_not_supported")
)

Functions

This section is empty.

Types

type Dsn

type Dsn struct {
	Type     int
	User     string
	Password string
	Protocol string
	Host     string
	Port     int
	Database string
	Driver   string
}

"admin:xxxxxxxxx@tcp(localhost:3306)/test"

func NewDsn

func NewDsn(dsn ...string) *Dsn

func (*Dsn) GoString

func (instance *Dsn) GoString() string

func (*Dsn) IsValid

func (instance *Dsn) IsValid() bool

func (*Dsn) String

func (instance *Dsn) String() string

String return dsn string. i.e. "admin:xxxxxxxx@tcp(localhost:3306)/test"

type SemanticConfig

type SemanticConfig struct {
	CaseSensitive bool              `json:"case_sensitive"`
	DbInternal    *SemanticConfigDb `json:"db_internal"` // internal storage
	DbExternal    *SemanticConfigDb `json:"db_external"` // db containing indexed data
}

func NewSemanticConfig

func NewSemanticConfig() *SemanticConfig

func (*SemanticConfig) IsValid

func (instance *SemanticConfig) IsValid() bool

func (*SemanticConfig) Parse

func (instance *SemanticConfig) Parse(data interface{}) error

func (*SemanticConfig) String

func (instance *SemanticConfig) String() string

type SemanticConfigDb

type SemanticConfigDb struct {
	Driver string `json:"driver"`
	Dsn    string `json:"dsn"`
}

func (*SemanticConfigDb) IsValid

func (instance *SemanticConfigDb) IsValid() bool

func (*SemanticConfigDb) Parse

func (instance *SemanticConfigDb) Parse(text string)

Jump to

Keyboard shortcuts

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