database

package
v0.0.0-...-a7b02b2 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAvailableTable

func CheckAvailableTable(requiredSeats int) int

CheckAvailableTable will retrieve the table's id after successful search. In other case, will retrieve a zero.

func FindBookingByID

func FindBookingByID(idToSearch int) (int, int, int, int)

FindBookingByID will retrieve the values to build a booking after successful search. In other case, will retrieve multiple zeros.

func InsertBooking

func InsertBooking(id int, people int, state int, table int) bool

InsertBooking will retrieve true after successful insertion. In other case, will retrieve false.

func InsertTable

func InsertTable(id int, seats int, status int) bool

InsertTable will retrieve true after successful insertion. In other case, will retrieve false.

func TruncateBookings

func TruncateBookings() error

TruncateBookings will retrieve empty error after successful truncate. In other case, will retrieve a filled error.

func TruncateTables

func TruncateTables() error

TruncateTables will retrieve empty error after successful truncate. In other case, will retrieve a filled error.

func UpdateStatusBookingByID

func UpdateStatusBookingByID(id int, newStatus int) bool

UpdateStatusBookingByID will retrieve true after successful update. In other case, will retrieve false.

func UpdateStatusTableByID

func UpdateStatusTableByID(id int, newStatus int) bool

UpdateStatusTableByID will retrieve true after successful update. In other case, will retrieve a zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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