database

package
v0.0.0-...-aff0e78 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2025 License: MIT Imports: 9 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 struct {
	Handle   *sql.DB
	User     string
	DSN      string
	Provider string
	Schema   string
	HasRowID bool
}

func Open

func Open(user *string, name string, action dsns.DSNAction) (db *Database, err error)

OpenDSN opens the database that is associated with the named DSN.

func (*Database) Begin

func (d *Database) Begin() (*sql.Tx, error)

Begin is a shim to pass through to the underlying database handle.

func (*Database) Close

func (d *Database) Close()

Close is a shim to pass through to the underlying database handle.

func (*Database) Exec

func (d *Database) Exec(sqlText string, parameters ...interface{}) (sql.Result, error)

Exec is a shim to pass through to the underlying database handle.

func (*Database) Query

func (d *Database) Query(sqlText string, parameters ...interface{}) (*sql.Rows, error)

Query is a shim to pass through to the underlying database handle.

Jump to

Keyboard shortcuts

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