ormsqlite

package module
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

New init new sqlite connection

func WithSQLite

func WithSQLite() plugins.Plugin

WithSQLite launch SQLite connection pool

Types

type Config

type Config struct {
	Pool []Item `yaml:"sqlite"`
}

Config pool of configs

func (*Config) List

func (c *Config) List() (list []sqlcommon.ItemInterface)

List getting all configs

type ConfigSqlite

type ConfigSqlite struct {
	Pool    []Item                  `yaml:"sqlite"`
	Migrate []orm.ConfigMigrateItem `yaml:"sqlite_migrate"`
}

ConfigSqlite sqlite config model

func (*ConfigSqlite) Default

func (v *ConfigSqlite) Default()

func (*ConfigSqlite) List

func (v *ConfigSqlite) List() (list []sqlcommon.ItemInterface)

List getting all configs

type Item

type Item struct {
	Name        string `yaml:"name"`
	File        string `yaml:"file"`
	Cache       string `yaml:"cache"`
	Mode        string `yaml:"mode"`
	Journal     string `yaml:"journal"`
	LockingMode string `yaml:"locking_mode"`
	OtherParams string `yaml:"other_params"`
}

Item config model

func (Item) GetDSN

func (i Item) GetDSN() string

GetDSN connection params

func (Item) GetName

func (i Item) GetName() string

GetName getting config name

func (Item) Setup

func (i Item) Setup(_ sqlcommon.SetupInterface)

Setup setting config conntections params

type SQLite

type SQLite interface {
	Pool(name string) orm.Stmt
}

SQLite connection SQLite interface

Jump to

Keyboard shortcuts

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