database

package module
v0.0.0-...-ea3c94a Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(db *sql.DB) error

Create makes a table called example and populates it

func Exec

func Exec(db *sql.DB) error

Exec takes a new connection creates tables, and later drops them and issues some queries

func Query

func Query(db *sql.DB, name string) error

Query grabs a new connection creates tables, and later drops them and issues some queries

func Setup

func Setup() (*sql.DB, error)

Setup configures and returns our database connection poold

Types

type Example

type Example struct {
	Name    string
	Created *time.Time
}

Example hold the results of our queries

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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