engine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterEngine

func RegisterEngine(name string, engine Engine)

Types

type Engine

type Engine interface {
	Connect(uri string) error
	GetNow() (string, error)
	GetDB() *sql.DB
	Close() error
}

func GetEngine

func GetEngine(name string) Engine

type MSSQL

type MSSQL struct {
	// contains filtered or unexported fields
}

func (*MSSQL) Close

func (m *MSSQL) Close() error

func (*MSSQL) Connect

func (m *MSSQL) Connect(mssqlURI string) error

func (*MSSQL) GetDB

func (m *MSSQL) GetDB() *sql.DB

func (*MSSQL) GetNow

func (m *MSSQL) GetNow() (string, error)

type Mysql

type Mysql struct {
	// contains filtered or unexported fields
}

func (*Mysql) Close

func (m *Mysql) Close() error

func (*Mysql) Connect

func (m *Mysql) Connect(mysqlURI string) error

func (*Mysql) GetDB

func (m *Mysql) GetDB() *sql.DB

func (*Mysql) GetNow

func (s *Mysql) GetNow() (string, error)

type Postgres

type Postgres struct {
	// contains filtered or unexported fields
}

func (*Postgres) Close

func (s *Postgres) Close() error

func (*Postgres) Connect

func (s *Postgres) Connect(pgURI string) error

func (*Postgres) GetDB

func (s *Postgres) GetDB() *sql.DB

func (*Postgres) GetNow

func (s *Postgres) GetNow() (string, error)

Jump to

Keyboard shortcuts

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