Documentation ¶
Overview ¶
Package infra contains the types for schema 'eitandb'.
Package infra contains the types for schema 'eitandb'.
Package infra contains the types for schema 'eitandb'.
Package infra contains the types for schema 'eitandb'.
Package infra contains the types for schema 'eitandb'.
Index ¶
- Constants
- Variables
- type Execer
- type Executor
- type MatchWaitingPlayer
- func GetAllMatchWaitingPlayers(ctx context.Context, db Queryer) ([]*MatchWaitingPlayer, error)
- func GetMatchWaitingPlayer(ctx context.Context, db Queryer, key string) (*MatchWaitingPlayer, error)
- func GetMatchWaitingPlayers(ctx context.Context, db Queryer, keys []string) ([]*MatchWaitingPlayer, error)
- func MatchWaitingPlayerByPlayerID(ctx context.Context, db Queryer, playerID string) (*MatchWaitingPlayer, error)
- func (mwp *MatchWaitingPlayer) Delete(ctx context.Context, db Execer) error
- func (mwp *MatchWaitingPlayer) Deleted() bool
- func (mwp *MatchWaitingPlayer) Exists() bool
- func (mwp *MatchWaitingPlayer) Insert(ctx context.Context, db Execer) error
- func (mwp *MatchWaitingPlayer) InsertIfNotExist(ctx context.Context, db Executor) error
- func (mwp *MatchWaitingPlayer) InsertOrUpdate(ctx context.Context, db Executor) error
- func (mwp *MatchWaitingPlayer) Player(ctx context.Context, db Executor) (*Player, error)
- func (mwp *MatchWaitingPlayer) Update(ctx context.Context, db Execer) error
- type Player
- func GetAllPlayers(ctx context.Context, db Queryer) ([]*Player, error)
- func GetPlayer(ctx context.Context, db Queryer, key string) (*Player, error)
- func GetPlayers(ctx context.Context, db Queryer, keys []string) ([]*Player, error)
- func PlayerByID(ctx context.Context, db Queryer, id string) (*Player, error)
- func PlayerByUserID(ctx context.Context, db Queryer, userID string) (*Player, error)
- func PlayersByUserID(ctx context.Context, db Queryer, userID string) ([]*Player, error)
- func (p *Player) Delete(ctx context.Context, db Execer) error
- func (p *Player) Deleted() bool
- func (p *Player) Exists() bool
- func (p *Player) Insert(ctx context.Context, db Execer) error
- func (p *Player) InsertIfNotExist(ctx context.Context, db Executor) error
- func (p *Player) InsertOrUpdate(ctx context.Context, db Executor) error
- func (p *Player) Update(ctx context.Context, db Execer) error
- type Queryer
- type QuizRoom
- func GetAllQuizRooms(ctx context.Context, db Queryer) ([]*QuizRoom, error)
- func GetQuizRoom(ctx context.Context, db Queryer, key string) (*QuizRoom, error)
- func GetQuizRooms(ctx context.Context, db Queryer, keys []string) ([]*QuizRoom, error)
- func QuizRoomByID(ctx context.Context, db Queryer, id string) (*QuizRoom, error)
- func (qr *QuizRoom) Delete(ctx context.Context, db Execer) error
- func (qr *QuizRoom) Deleted() bool
- func (qr *QuizRoom) Exists() bool
- func (qr *QuizRoom) Insert(ctx context.Context, db Execer) error
- func (qr *QuizRoom) InsertIfNotExist(ctx context.Context, db Executor) error
- func (qr *QuizRoom) InsertOrUpdate(ctx context.Context, db Executor) error
- func (qr *QuizRoom) Update(ctx context.Context, db Execer) error
- type QuizRoomPlayer
- func GetAllQuizRoomPlayers(ctx context.Context, db Queryer) ([]*QuizRoomPlayer, error)
- func GetQuizRoomPlayer(ctx context.Context, db Queryer, key string) (*QuizRoomPlayer, error)
- func GetQuizRoomPlayers(ctx context.Context, db Queryer, keys []string) ([]*QuizRoomPlayer, error)
- func QuizRoomPlayerByPlayerID(ctx context.Context, db Queryer, playerID string) (*QuizRoomPlayer, error)
- func QuizRoomPlayersByPlayerID(ctx context.Context, db Queryer, playerID string) ([]*QuizRoomPlayer, error)
- func (qrp *QuizRoomPlayer) Delete(ctx context.Context, db Execer) error
- func (qrp *QuizRoomPlayer) Deleted() bool
- func (qrp *QuizRoomPlayer) Exists() bool
- func (qrp *QuizRoomPlayer) Insert(ctx context.Context, db Execer) error
- func (qrp *QuizRoomPlayer) InsertIfNotExist(ctx context.Context, db Executor) error
- func (qrp *QuizRoomPlayer) InsertOrUpdate(ctx context.Context, db Executor) error
- func (qrp *QuizRoomPlayer) Player(ctx context.Context, db Executor) (*Player, error)
- func (qrp *QuizRoomPlayer) QuizRoom(ctx context.Context, db Executor) (*QuizRoom, error)
- func (qrp *QuizRoomPlayer) Update(ctx context.Context, db Execer) error
- type ScannerValuer
- type Slice
- type StringSlice
Constants ¶
const ( // Exec operation for like sql.DB.Exec() Exec operation = 1 // Query operation for sql.DB.Query() Query operation = 2 )
Variables ¶
var XOLog = func(ctx context.Context, sqlstr string, params ...interface{}) {}
XOLog provides the log func used by generated queries.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
Executor is the common interface for database operations that can be used with types from schema 'eitandb'.
This should work with database/sql.DB and database/sql.Tx.
type MatchWaitingPlayer ¶
type MatchWaitingPlayer struct { PlayerID string `db:"player_id"` // player_id CreatedAt time.Time `db:"created_at"` // created_at // contains filtered or unexported fields }
MatchWaitingPlayer represents a row from 'match_waiting_players'.
func GetAllMatchWaitingPlayers ¶
func GetAllMatchWaitingPlayers(ctx context.Context, db Queryer) ([]*MatchWaitingPlayer, error)
GetAllMatchWaitingPlayers gets all MatchWaitingPlayers
func GetMatchWaitingPlayer ¶
func GetMatchWaitingPlayer(ctx context.Context, db Queryer, key string) (*MatchWaitingPlayer, error)
GetMatchWaitingPlayer gets a MatchWaitingPlayer by primary key
func GetMatchWaitingPlayers ¶
func GetMatchWaitingPlayers(ctx context.Context, db Queryer, keys []string) ([]*MatchWaitingPlayer, error)
GetMatchWaitingPlayers gets MatchWaitingPlayer list by primary keys
func MatchWaitingPlayerByPlayerID ¶
func MatchWaitingPlayerByPlayerID(ctx context.Context, db Queryer, playerID string) (*MatchWaitingPlayer, error)
MatchWaitingPlayerByPlayerID retrieves a row from 'match_waiting_players' as a MatchWaitingPlayer. Generated from index 'match_waiting_players_player_id_pkey'.
func (*MatchWaitingPlayer) Delete ¶
func (mwp *MatchWaitingPlayer) Delete(ctx context.Context, db Execer) error
Delete deletes the MatchWaitingPlayer from the database.
func (*MatchWaitingPlayer) Deleted ¶
func (mwp *MatchWaitingPlayer) Deleted() bool
Deleted provides information if the MatchWaitingPlayer has been deleted from the database.
func (*MatchWaitingPlayer) Exists ¶
func (mwp *MatchWaitingPlayer) Exists() bool
Exists determines if the MatchWaitingPlayer exists in the database.
func (*MatchWaitingPlayer) Insert ¶
func (mwp *MatchWaitingPlayer) Insert(ctx context.Context, db Execer) error
Insert inserts the MatchWaitingPlayer to the database.
func (*MatchWaitingPlayer) InsertIfNotExist ¶
func (mwp *MatchWaitingPlayer) InsertIfNotExist(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the MatchWaitingPlayer to the database.
func (*MatchWaitingPlayer) InsertOrUpdate ¶
func (mwp *MatchWaitingPlayer) InsertOrUpdate(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the MatchWaitingPlayer to the database.
type Player ¶
type Player struct { ID string `db:"id"` // id UserID string `db:"user_id"` // user_id CreatedAt time.Time `db:"created_at"` // created_at UpdatedAt time.Time `db:"updated_at"` // updated_at // contains filtered or unexported fields }
Player represents a row from 'players'.
func GetAllPlayers ¶
GetAllPlayers gets all Players
func GetPlayers ¶
GetPlayers gets Player list by primary keys
func PlayerByID ¶
PlayerByID retrieves a row from 'players' as a Player. Generated from index 'players_id_pkey'.
func PlayerByUserID ¶
PlayerByUserID retrieves a row from 'players' as a Player. Generated from index 'user_id'.
func PlayersByUserID ¶
PlayersByUserID retrieves a row from 'players' as a Player. Generated from index 'user_id_idx'.
func (*Player) Deleted ¶
Deleted provides information if the Player has been deleted from the database.
func (*Player) InsertIfNotExist ¶
InsertOrUpdate inserts or updates the Player to the database.
func (*Player) InsertOrUpdate ¶
InsertOrUpdate inserts or updates the Player to the database.
type QuizRoom ¶
type QuizRoom struct { ID string `db:"id"` // id CreatedAt time.Time `db:"created_at"` // created_at UpdatedAt time.Time `db:"updated_at"` // updated_at // contains filtered or unexported fields }
QuizRoom represents a row from 'quiz_rooms'.
func GetAllQuizRooms ¶
GetAllQuizRooms gets all QuizRooms
func GetQuizRoom ¶
GetQuizRoom gets a QuizRoom by primary key
func GetQuizRooms ¶
GetQuizRooms gets QuizRoom list by primary keys
func QuizRoomByID ¶
QuizRoomByID retrieves a row from 'quiz_rooms' as a QuizRoom. Generated from index 'quiz_rooms_id_pkey'.
func (*QuizRoom) Deleted ¶
Deleted provides information if the QuizRoom has been deleted from the database.
func (*QuizRoom) InsertIfNotExist ¶
InsertOrUpdate inserts or updates the QuizRoom to the database.
func (*QuizRoom) InsertOrUpdate ¶
InsertOrUpdate inserts or updates the QuizRoom to the database.
type QuizRoomPlayer ¶
type QuizRoomPlayer struct { QuizRoomID string `db:"quiz_room_id"` // quiz_room_id PlayerID string `db:"player_id"` // player_id CreatedAt time.Time `db:"created_at"` // created_at // contains filtered or unexported fields }
QuizRoomPlayer represents a row from 'quiz_room_players'.
func GetAllQuizRoomPlayers ¶
func GetAllQuizRoomPlayers(ctx context.Context, db Queryer) ([]*QuizRoomPlayer, error)
GetAllQuizRoomPlayers gets all QuizRoomPlayers
func GetQuizRoomPlayer ¶
GetQuizRoomPlayer gets a QuizRoomPlayer by primary key
func GetQuizRoomPlayers ¶
GetQuizRoomPlayers gets QuizRoomPlayer list by primary keys
func QuizRoomPlayerByPlayerID ¶
func QuizRoomPlayerByPlayerID(ctx context.Context, db Queryer, playerID string) (*QuizRoomPlayer, error)
QuizRoomPlayerByPlayerID retrieves a row from 'quiz_room_players' as a QuizRoomPlayer. Generated from index 'quiz_room_players_player_id_pkey'.
func QuizRoomPlayersByPlayerID ¶
func QuizRoomPlayersByPlayerID(ctx context.Context, db Queryer, playerID string) ([]*QuizRoomPlayer, error)
QuizRoomPlayersByPlayerID retrieves a row from 'quiz_room_players' as a QuizRoomPlayer. Generated from index 'player_id'.
func (*QuizRoomPlayer) Delete ¶
func (qrp *QuizRoomPlayer) Delete(ctx context.Context, db Execer) error
Delete deletes the QuizRoomPlayer from the database.
func (*QuizRoomPlayer) Deleted ¶
func (qrp *QuizRoomPlayer) Deleted() bool
Deleted provides information if the QuizRoomPlayer has been deleted from the database.
func (*QuizRoomPlayer) Exists ¶
func (qrp *QuizRoomPlayer) Exists() bool
Exists determines if the QuizRoomPlayer exists in the database.
func (*QuizRoomPlayer) Insert ¶
func (qrp *QuizRoomPlayer) Insert(ctx context.Context, db Execer) error
Insert inserts the QuizRoomPlayer to the database.
func (*QuizRoomPlayer) InsertIfNotExist ¶
func (qrp *QuizRoomPlayer) InsertIfNotExist(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the QuizRoomPlayer to the database.
func (*QuizRoomPlayer) InsertOrUpdate ¶
func (qrp *QuizRoomPlayer) InsertOrUpdate(ctx context.Context, db Executor) error
InsertOrUpdate inserts or updates the QuizRoomPlayer to the database.
func (*QuizRoomPlayer) Player ¶
Player returns the Player associated with the QuizRoomPlayer's PlayerID (player_id).
Generated from foreign key 'quiz_room_players_ibfk_2'.
type ScannerValuer ¶
ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.
type StringSlice ¶
type StringSlice []string
StringSlice is a slice of strings.
func (*StringSlice) Scan ¶
func (ss *StringSlice) Scan(src interface{}) error
Scan satisfies the sql.Scanner interface for StringSlice.