backend

package
v0.1.0-alpha.202401101127 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMySqlConnectionString

func IsMySqlConnectionString(connString string) bool

IsMySqlConnectionString returns true if the connection string is for mysql looks for the mysql:// prefix

func IsPostgresConnectionString

func IsPostgresConnectionString(connString string) bool

IsPostgresConnectionString returns true if the connection string is for postgres looks for the postgresql:// or postgres:// prefix

func IsSqliteConnectionString

func IsSqliteConnectionString(connString string) bool

IsSqliteConnectionString returns true if the connection string is for sqlite looks for the sqlite:// prefix

func NewGenericSQLRowReader

func NewGenericSQLRowReader() *genericSQLRowReader

func NewPgxRowReader

func NewPgxRowReader() *pgxRowReader

Types

type DBClientBackendType

type DBClientBackendType int
const (
	PostgresDBClientBackend DBClientBackendType = iota
	MySQLDBClientBackend
	SqliteDBClientBackend
)

func GetBackendFromConnectionString

func GetBackendFromConnectionString(ctx context.Context, connectionString string) (DBClientBackendType, error)

type RowReader

type RowReader interface {
	Read(columnValues []any, cols []*queryresult.ColumnDef) ([]any, error)
}

func NewMySqlRowReader

func NewMySqlRowReader() RowReader

func RowReaderFactory

func RowReaderFactory(backend DBClientBackendType) RowReader

Jump to

Keyboard shortcuts

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