dsn

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SQLite  = "sqlite"
	SQLite3 = "sqlite3"
	LevelDB = "leveldb"
	Mock    = "mock"
)

Supported schemes by this package.

View Source
const (
	ReadOnly = "readonly"
)

Supported options by this package.

Variables

This section is empty.

Functions

This section is empty.

Types

type DSN

type DSN struct {
	Scheme   string
	Path     string
	ReadOnly bool
	Options  map[string]string
}

DSN (data source name) represents the parsed components of an embedded database or database management service and is used to easily establish a connection to the db. TODO: add support for PostgreSQL and other server databases.

func Parse

func Parse(uri string) (out *DSN, err error)

Parse a string based DSN into its constituent parts, creating a structured representation that can be used to make an actual database connection.

func (*DSN) String

func (d *DSN) String() string

Jump to

Keyboard shortcuts

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