sqlite

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

gdbc-sqlite

GDBC Sqlite Driver - It is based on https://github.com/mattn/go-sqlite3](https://github.com/mattn/go-sqlite3)

Go Report Card codecov Build Status

Usage

dataSource, err := gdbc.GetDataSource("gdbc:sqlite:test.db?cache=shared&mode=memory")
if err != nil {
    panic(err)
}

var connection *sql.DB
connection, err = dataSource.GetConnection()
if err != nil {
    panic(err)
}

Sqlite GDBC URL takes the following form:

gdbc:sqlite:database-name?arg1=value1
gdbc:sqlite:database-file-path?arg1=value1

Checkout https://github.com/mattn/go-sqlite3 for arguments details.

Documentation

Index

Constants

View Source
const AuthKey = "_auth"
View Source
const PasswordAuthKey = "_auth_pass"
View Source
const UserAuthKey = "_auth_user"

Variables

This section is empty.

Functions

This section is empty.

Types

type SqliteSourceNameAdapter

type SqliteSourceNameAdapter struct {
}

func (SqliteSourceNameAdapter) GetDataSourceName

func (dsnAdapter SqliteSourceNameAdapter) GetDataSourceName(dataSource gdbc.DataSource) (string, error)

Jump to

Keyboard shortcuts

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