Skip to content

go-gdbc/gdbc-sqlite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gdbc-sqlite

GDBC Sqlite Driver - It is based on 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 github.com/mattn/go-sqlite3 for arguments details.