sql

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FuncMap

func FuncMap() template.FuncMap

Types

type Database

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

func Open added in v0.0.4

func Open(driverName, dataSourceName string) (*Database, error)

SQLOpen creates a new connection to an SQL database:

  • SQLite: (SQLOpen "sqlite" "/tmp/pimp.db").Query "..."

func (Database) Exec

func (db Database) Exec(query string, args ...interface{}) (sql.Result, error)

func (Database) Ping

func (db Database) Ping() (interface{}, error)

func (Database) Query

func (db Database) Query(query string, args ...interface{}) (*sql.Rows, error)

func (Database) String

func (db Database) String() string

Jump to

Keyboard shortcuts

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