connection

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	DB *sql.DB
	Dialector
}

func Connect

func Connect(ctx context.Context, dialector Dialector, options Options) (*Connection, error)

Connect connects to a database based on given dialector

type Dialector

type Dialector interface {
	Connect(context context.Context, options Options) (*sql.DB, error)
	GetFullDataType(property schema.Property) string
}

type Options

type Options struct {
	DatabaseType     string
	ConnectionString string
	Timezone         string
	Logger           *zap.Logger
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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