platform

package
v0.0.0-...-bd113ff Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

func List() []string

List returns a list of the names of the registered platforms.

func Register

func Register(name string, p Platform)

Register makes a database platform available by the provided name. It panics if the name is already registered or if the platform is nil.

Types

type Connection

type Connection interface {
	Query(ctx context.Context, query string) (dio.Reader, error)
	QueryRow(ctx context.Context, query string) Row
	Close(ctx context.Context) error
}

Connection represents a connection to a database.

type ConnectionConfig

type ConnectionConfig interface {
	ConnectionString() string
}

ConnectionConfig is a configuration for a connection to a database.

type MetadataReader

type MetadataReader interface {
}

type Platform

type Platform interface {
	OpenConnection(ctx context.Context, config ConnectionConfig) (Connection, error)
}

Platform represents a database platform.

func Get

func Get(name string) (Platform, error)

Get returns a registered platform by name or an error if the platform is not found.

type Row

type Row interface {
	Scan(dest ...any) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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