database

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const GET_ALL_ARTISTS = "select id, name FROM artists;"

Artists

View Source
const GET_ALL_LOCATIONS = `select id, name, IFNULL(description,""), IFNULL(city,""), IFNULL(state,""), IFNULL(country,"") FROM locations;`

Locations

View Source
const GET_ALL_SETS = "select sets.id, user_id, artists.id, artists.name, locations.id, locations.name " +
	"FROM sets INNER JOIN artists ON artists.id = sets.artist_id " +
	"INNER JOIN locations ON locations.id = sets.location_id;"

Sets

View Source
const GET_ALL_SETS_FOR_USER_FORMAT = "select sets.id, user_id, artists.id, artists.name, locations.id, locations.name " +
	"FROM sets INNER JOIN artists ON artists.id = sets.artist_id " +
	"INNER JOIN locations ON locations.id = sets.location_id " +
	"WHERE user_id=%d;"
View Source
const GET_ALL_USERS = `select id, username, email, IFNULL(first_name,""), IFNULL(last_name,""), role FROM users;`
View Source
const GET_SPECIFIC_ARTIST = "select id, name FROM artists where id = ?;"
View Source
const GET_SPECIFIC_LOCATION = `select id, name, IFNULL(description,""), IFNULL(city,""), IFNULL(state,""), IFNULL(country,"") FROM locations WHERE id = ?;`
View Source
const GET_SPECIFIC_USER = `select id, username, email, IFNULL(first_name,""), IFNULL(last_name,""), role FROM users where id = ?;`

Users

Variables

View Source
var DSN = ""

Functions

func GetConnection

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

func Initialize

func Initialize()

Types

This section is empty.

Jump to

Keyboard shortcuts

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