Documentation
¶
Index ¶
- Constants
- func NewSQLiteV2(config Config, models ...any) (db database.DatabaseV2, err error)
- func NewSqliteDb(config Config, models ...any) (db database.Database, err error)deprecated
- func NewWithLogger(config Config, logger logger.Logger, models ...any) (db database.DatabaseV2, err error)
- type Config
Constants ¶
View Source
const DriverName = "sqlite"
Variables ¶
This section is empty.
Functions ¶
func NewSQLiteV2 ¶ added in v1.2.18
func NewSQLiteV2(config Config, models ...any) (db database.DatabaseV2, err error)
NewSQLiteV2 creates a new sqlite database instance.
func NewWithLogger ¶ added in v1.2.19
Types ¶
type Config ¶
type Config struct {
Database string `yaml:"database,omitempty" json:"database,omitempty" xml:"database,omitempty"`
Stdout string `yaml:"stdout,omitempty" json:"stdout,omitempty" xml:"stdout,omitempty"`
Stderr string `yaml:"stderr,omitempty" json:"stderr,omitempty" xml:"stderr,omitempty"`
MaxIdle int `yaml:"max_idle,omitempty" json:"max_idle,omitempty" xml:"max_idle,omitempty"`
MaxOpen int `yaml:"max_open,omitempty" json:"max_open,omitempty" xml:"max_open,omitempty"`
MaxLifeSecond int `yaml:"max_life_second,omitempty" json:"max_life_second,omitempty" xml:"max_life_second,omitempty"`
TimeoutSecond int `yaml:"timeout_second,omitempty" json:"timeout_second,omitempty" xml:"timeout_second,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.