sqlite3

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

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)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	*sql.Adapter
}

Adapter definition for mysql database.

func New added in v0.5.0

func New(database *db.DB) *Adapter

New is mysql adapter constructor.

func Open

func Open(dsn string) (*Adapter, error)

Open mysql connection using dsn.

Jump to

Keyboard shortcuts

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