sqlite3

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 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

View Source
var (

	// Config for mysql adapter.
	Config = sql.Config{
		Placeholder:         "?",
		EscapeChar:          "`",
		InsertDefaultValues: true,
		IncrementFunc:       incrementFunc,
		ErrorFunc:           errorFunc,
		MapColumnFunc:       mapColumnFunc,
	}
)

Functions

This section is empty.

Types

type Adapter

type Adapter struct {
	*sql.Adapter
}

Adapter definition for mysql database.

func New

func New(database *db.DB) *Adapter

New sqlite adapter using existing connection.

func Open

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

Open sqlite connection using dsn.

Jump to

Keyboard shortcuts

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