database

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 2, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

type Database interface {
	Close()
	Connect(dbFile string) error
	Exec(sql string, args ...interface{}) (sql.Result, error)
	Query(sql string, args ...interface{}) (rows.Rows, error)
}

Database Define a common interface for all database drivers

type Sqlite

type Sqlite struct {
	Database
	// contains filtered or unexported fields
}

Sqlite Handle an Sqlite connection

func (*Sqlite) Close

func (s *Sqlite) Close()

Close Close open database

func (*Sqlite) Connect

func (s *Sqlite) Connect(dbFile string) error

Connect Connect/open the database

func (*Sqlite) Exec

func (s *Sqlite) Exec(sql string, args ...interface{}) (sql.Result, error)

Exec Execute a query on the database, returning a simple result

func (*Sqlite) Query

func (s *Sqlite) Query(sql string, args ...interface{}) (rows.Rows, error)

Query Query the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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