sqlutil

package
v0.0.0-...-4ed88a5 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBs

func DBs(
	ctx context.Context,
	addrs []crdbutil.SocketAddress,
	dbName string,
	certsDir string,
	insecure bool,
	dbExists bool,
) ([]*sql.DB, error)

DBs creates connections to each host. If the database does not already exist, it is first created. The caller is responsible for closing these connections.

func GormDBs

func GormDBs(
	ctx context.Context,
	addrs []crdbutil.SocketAddress,
	dbName string,
	certsDir string,
	insecure bool,
	dbExists bool,
) ([]*gorm.DB, error)

GormDBs creates connections to each host using GORM ORM. If the database does not already exist, it is first created. The caller is responsible for closing these connections. THIS IS DEPRECATED IN FAVOUR OF DBs()

Types

This section is empty.

Jump to

Keyboard shortcuts

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