sqlite3

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 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 added in v0.5.0

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