Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connection ¶
Types ¶
type Statement ¶
type Statement string
const ( // InsertOutfit inserts outfits. Requires a fully populated &Outfit InsertOutfit Statement = "" /* 202-byte string literal not displayed */ // UpdateOutfit Requires a fully populated &Outfit. Will overwrite the outfit with the provided ID UpdateOutfit Statement = "" /* 207-byte string literal not displayed */ // GetOutfit Requires an ID string. Returns one outfit GetOutfit Statement = "SELECT * FROM outfits WHERE id = :id" // GetOutfitFromTag Requires a Tag. Returns one outfit GetOutfitFromTag Statement = "SELECT * FROM outfits WHERE tag = :tag AND deleted = 0" // TODO: Way to add a LIMIT X? // GetRandomOutfit Requires nothing. Returns one outfit GetRandomOutfit Statement = "SELECT 1 FROM outfits WHERE deleted = 0 ORDER BY RANDOM()" // GetRandomOutfitFromSubmitter Requires a user ID. Returns one outfit GetRandomOutfitFromSubmitter Statement = "SELECT 1 FROM outfits WHERE submitter = :submitter AND deleted = 0 ORDER BY RANDOM()" // GetTopFive requires nothing. Returns 5 user IDs and the number of outfits GetTopFive Statement = "SELECT submitter, count(*) AS num FROM outfits WHERE deleted = false GROUP BY submitter ORDER BY num DESC LIMIT 5" )
Click to show internal directories.
Click to hide internal directories.