dbutil

package
v1.81.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Implementation

type Implementation int

Implementation type of valid DBs.

const (
	// Unknown is an unknown db type.
	Unknown Implementation = iota
	// Postgres is a Postgresdb type.
	Postgres
	// Cockroach is a Cockroachdb type.
	Cockroach
	// Bolt is a Bolt kv store.
	Bolt
	// Redis is a Redis kv store.
	Redis
	// SQLite3 is a sqlite3 database.
	SQLite3
)

func ImplementationForScheme

func ImplementationForScheme(scheme string) Implementation

ImplementationForScheme returns the Implementation that is used for the url with the provided scheme.

func SplitConnStr

func SplitConnStr(s string) (driver string, source string, implementation Implementation, err error)

SplitConnStr returns the driver and DSN portions of a URL, along with the db implementation.

Jump to

Keyboard shortcuts

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