Documentation
¶
Index ¶
- Constants
- type Driver
- func (Driver) IsForeignKeyViolation(err error) bool
- func (Driver) IsUniqueViolation(err error) bool
- func (Driver) ItemsCreateQuery() string
- func (Driver) ItemsGetQuery() string
- func (Driver) ItemsListQuery(arcade.ItemsFilter) string
- func (Driver) ItemsRemoveQuery() string
- func (Driver) ItemsUpdateQuery() string
- func (Driver) LinksCreateQuery() string
- func (Driver) LinksGetQuery() string
- func (Driver) LinksListQuery(arcade.LinksFilter) string
- func (Driver) LinksRemoveQuery() string
- func (Driver) LinksUpdateQuery() string
- func (Driver) PlayersCreateQuery() string
- func (Driver) PlayersGetQuery() string
- func (Driver) PlayersListQuery(filter arcade.PlayersFilter) string
- func (Driver) PlayersRemoveQuery() string
- func (Driver) PlayersUpdateQuery() string
- func (Driver) RoomsCreateQuery() string
- func (Driver) RoomsGetQuery() string
- func (Driver) RoomsListQuery(arcade.RoomsFilter) string
- func (Driver) RoomsRemoveQuery() string
- func (Driver) RoomsUpdateQuery() string
Constants ¶
const ( PlayersListQuery = `SELECT player_id, name, description, home_id, location_id, created, updated FROM players` PlayersGetQuery = `SELECT player_id, name, description, home_id, location_id, created, updated FROM players WHERE player_id = $1` PlayersCreateQuery = `INSERT INTO players (name, description, home_id, location_id) ` + `VALUES ($1, $2, $3, $4) ` + `RETURNING player_id, name, description, home_id, location_id, created, updated` PlayersUpdateQuery = `UPDATE players SET name = $2, description = $3, home_id = $4, location_id = $5, updated = now() ` + `WHERE player_id = $1 ` + `RETURNING player_id, name, description, home_id, location_id, created, updated` PlayersRemoveQuery = `DELETE FROM players WHERE player_id = $1` RoomsListQuery = `SELECT room_id, name, description, owner_id, parent_id, created, updated FROM rooms` RoomsGetQuery = `SELECT room_id, name, description, owner_id, parent_id, created, updated FROM rooms WHERE room_id = $1` RoomsCreateQuery = `INSERT INTO rooms (name, description, owner_id, parent_id) ` + `VALUES ($1, $2, $3, $4) ` + `RETURNING room_id, name, description, owner_id, parent_id, created, updated` RoomsUpdateQuery = `UPDATE rooms SET name = $2, description = $3, owner_id = $4, parent_id = $5, updated = now() ` + `WHERE room_id = $1 ` + `RETURNING room_id, name, description, owner_id, parent_id, created, updated` RoomsRemoveQuery = `DELETE FROM rooms WHERE room_id = $1` LinksListQuery = `SELECT link_id, name, description, owner_id, location_id, destination_id, created, updated FROM links` LinksGetQuery = `SELECT link_id, name, description, owner_id, location_id, destination_id, created, updated FROM links WHERE link_id = $1` LinksCreateQuery = `INSERT INTO links (name, description, owner_id, location_id, destination_id) ` + `VALUES ($1, $2, $3, $4, $5) ` + `RETURNING link_id, name, description, owner_id, location_id, destination_id, created, updated` LinksUpdateQuery = `UPDATE links SET name = $2, description = $3, owner_id = $4, location_id = $5, destination_id = $6, updated = now() ` + `WHERE link_id = $1 ` + `RETURNING link_id, name, description, owner_id, location_id, destination_id, created, updated` LinksRemoveQuery = `DELETE FROM links WHERE link_id = $1` ItemsListQuery = `SELECT item_id, name, description, owner_id, location_id, inventory_id, created, updated FROM items` ItemsGetQuery = `SELECT item_id, name, description, owner_id, location_id, inventory_id, created, updated FROM items WHERE item_id = $1` ItemsCreateQuery = `INSERT INTO items (name, description, owner_id, location_id, inventory_id) ` + `VALUES ($1, $2, $3, $4, $5) ` + `RETURNING item_id, name, description, owner_id, location_id, inventory_id, created, updated` ItemsUpdateQuery = `UPDATE items SET name = $2, description = $3, owner_id = $4, location_id = $5, inventory_id = $6, updated = now() ` + `WHERE item_id = $1 ` + `RETURNING item_id, name, description, owner_id, location_id, inventory_id, created, updated` ItemsRemoveQuery = `DELETE FROM items WHERE item_id = $1` )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct{}
func (Driver) IsForeignKeyViolation ¶
IsForeignKeyViolation returns true if the given error is a foreign key violation error.
func (Driver) IsUniqueViolation ¶
IsUniqueViolation returns true if the given error is a unique violation error.
func (Driver) ItemsCreateQuery ¶
ItemsCreateQuery returns the Create query string.
func (Driver) ItemsGetQuery ¶
ItemsGetQuery returns the Get query string.
func (Driver) ItemsListQuery ¶
func (Driver) ItemsListQuery(arcade.ItemsFilter) string
ItemsListQuery returns the List query string given the filter.
func (Driver) ItemsRemoveQuery ¶
ItemsRemoveQuery returns the Remove query string.
func (Driver) ItemsUpdateQuery ¶
ItemsUpdateQuery returns the Update query string.
func (Driver) LinksCreateQuery ¶
LinksCreateQuery returns the Create query string.
func (Driver) LinksGetQuery ¶
LinksGetQuery returns the Get query string.
func (Driver) LinksListQuery ¶
func (Driver) LinksListQuery(arcade.LinksFilter) string
LinksListQuery returns the List query string given the filter.
func (Driver) LinksRemoveQuery ¶
LinksRemoveQuery returns the Remove query string.
func (Driver) LinksUpdateQuery ¶
LinksUpdateQuery returns the Update query string.
func (Driver) PlayersCreateQuery ¶
PlayersCreateQuery returns the Create query string.
func (Driver) PlayersGetQuery ¶
PlayersGetQuery returns the Get query string.
func (Driver) PlayersListQuery ¶
func (Driver) PlayersListQuery(filter arcade.PlayersFilter) string
PlayersListQuery returns the List query string given the filter.
func (Driver) PlayersRemoveQuery ¶
PlayersRemoveQuery returns the Remove query string.
func (Driver) PlayersUpdateQuery ¶
PlayersUpdateQuery returns the update query string.
func (Driver) RoomsCreateQuery ¶
RoomsCreateQuery returns the Create query string.
func (Driver) RoomsGetQuery ¶
RoomsGetQuery returns the Get query string.
func (Driver) RoomsListQuery ¶
func (Driver) RoomsListQuery(arcade.RoomsFilter) string
RoomListQuery returns the List query string given the filter.
func (Driver) RoomsRemoveQuery ¶
RoomsRemoveQuery returns the Remove query string.
func (Driver) RoomsUpdateQuery ¶
RoomsUpdateQuery returns the Update query string.