dalgo2sql

package module
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: MIT Imports: 8 Imported by: 2

README

dalgo2sql

SQL driver for DALgo - a Database Abstraction Layer in Go.

Status

Lint, Vet, Build, Test Go Report Card GoDoc

Usage

go get github.com/dal-go/dalgo2sql

License

Free to use and open source under MIT License.

Documentation

Index

Constants

View Source
const Version = "0.0.1"

Version indicates package version

Variables

This section is empty.

Functions

func NewDatabase

func NewDatabase(db *sql.DB, options Options) dal.Database

NewDatabase creates a new instance of DALgo adapter for BungDB

Types

type Field

type Field struct {
	Name string
}

Field defines field

type Options

type Options struct {
	Recordsets map[string]Recordset
}

Options provides database sqlOptions for DALgo - // TODO: document why & how to use

type Recordset

type Recordset struct {
	Type       RecordsetType
	Name       string
	PrimaryKey []Field // Primary keys by table name
}

Recordset hold recordset settings

type RecordsetType

type RecordsetType = int

RecordsetType defines type of a database recordset

const (
	// Table identifies a table in a database
	Table RecordsetType = iota
	// View identifies a view in a database
	View
	// StoredProcedure identifies a stored procedure in a database
	StoredProcedure
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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