Skip to content

sqlite3

import "github.com/go-rel/sqlite3"

Overview

Package sqlite3 wraps go-sqlite3 driver as an adapter for rel.

Usage:

// open sqlite3 connection.
adapter, err := sqlite3.Open("dev.db")
if err != nil {
    panic(err)
}
defer adapter.Close()

// initialize rel's repo.
repo := rel.New(adapter)

func New

func New(database *db.DB) rel.Adapter
New sqlite3 adapter using existing connection.

func Open

func Open(dsn string) (rel.Adapter, error)
Open sqlite3 connection using dsn.


Last update: 2022-06-25