Documentation
¶
Index ¶
- Constants
- Variables
- func NewDriver() driver.NamedDriver
- func NewPersistenceWithOpts[V dbObject](dataSourceName string, opts common.Opts, ...) (V, error)
- type Driver
- func (d *Driver) NewTransactionalUnversioned(dataSourceName string, config driver.Config) (driver.TransactionalUnversionedPersistence, error)
- func (d *Driver) NewTransactionalVersioned(dataSourceName string, config driver.Config) (driver.TransactionalVersionedPersistence, error)
- func (d *Driver) NewUnversioned(dataSourceName string, config driver.Config) (driver.UnversionedPersistence, error)
- func (d *Driver) NewVersioned(dataSourceName string, config driver.Config) (driver.VersionedPersistence, error)
Constants ¶
View Source
const ( Postgres common.SQLDriverType = "postgres" SQLite common.SQLDriverType = "sqlite" SQLPersistence driver2.PersistenceType = "sql" )
Variables ¶
View Source
var UnversionedConstructors = map[common.SQLDriverType]persistenceConstructor[unversionedPersistence]{ Postgres: func(o common.Opts, t string) (unversionedPersistence, error) { return postgres.NewUnversioned(o, t) }, SQLite: func(o common.Opts, t string) (unversionedPersistence, error) { return sqlite.NewUnversioned(o, t) }, }
View Source
var VersionedConstructors = map[common.SQLDriverType]persistenceConstructor[transactionalVersionedPersistence]{ Postgres: func(o common.Opts, t string) (transactionalVersionedPersistence, error) { return postgres.NewVersioned(o, t) }, SQLite: func(o common.Opts, t string) (transactionalVersionedPersistence, error) { return sqlite.NewVersioned(o, t) }, }
Functions ¶
func NewDriver ¶
func NewDriver() driver.NamedDriver
func NewPersistenceWithOpts ¶
Types ¶
type Driver ¶
type Driver struct { }
func (*Driver) NewTransactionalUnversioned ¶
func (*Driver) NewTransactionalVersioned ¶
func (*Driver) NewUnversioned ¶
func (*Driver) NewVersioned ¶
Click to show internal directories.
Click to hide internal directories.