infra

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

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

View Source
const (
	// Exec operation for like sql.DB.Exec()
	Exec operation = 1
	// Query operation for sql.DB.Query()
	Query operation = 2
)

Variables

View Source
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 Execer

type Execer interface {
	sqlx.Execer
	sqlx.ExecerContext
}

type Executor

type Executor interface {
	Queryer
	Execer
}

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.

func (*MatchWaitingPlayer) Player

func (mwp *MatchWaitingPlayer) Player(ctx context.Context, db Executor) (*Player, error)

Player returns the Player associated with the MatchWaitingPlayer's PlayerID (player_id).

Generated from foreign key 'match_waiting_players_ibfk_1'.

func (*MatchWaitingPlayer) Update

func (mwp *MatchWaitingPlayer) Update(ctx context.Context, db Execer) error

Update updates the MatchWaitingPlayer in 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

func GetAllPlayers(ctx context.Context, db Queryer) ([]*Player, error)

GetAllPlayers gets all Players

func GetPlayer

func GetPlayer(ctx context.Context, db Queryer, key string) (*Player, error)

GetPlayer gets a Player by primary key

func GetPlayers

func GetPlayers(ctx context.Context, db Queryer, keys []string) ([]*Player, error)

GetPlayers gets Player list by primary keys

func PlayerByID

func PlayerByID(ctx context.Context, db Queryer, id string) (*Player, error)

PlayerByID retrieves a row from 'players' as a Player. Generated from index 'players_id_pkey'.

func PlayerByUserID

func PlayerByUserID(ctx context.Context, db Queryer, userID string) (*Player, error)

PlayerByUserID retrieves a row from 'players' as a Player. Generated from index 'user_id'.

func PlayersByUserID

func PlayersByUserID(ctx context.Context, db Queryer, userID string) ([]*Player, error)

PlayersByUserID retrieves a row from 'players' as a Player. Generated from index 'user_id_idx'.

func (*Player) Delete

func (p *Player) Delete(ctx context.Context, db Execer) error

Delete deletes the Player from the database.

func (*Player) Deleted

func (p *Player) Deleted() bool

Deleted provides information if the Player has been deleted from the database.

func (*Player) Exists

func (p *Player) Exists() bool

Exists determines if the Player exists in the database.

func (*Player) Insert

func (p *Player) Insert(ctx context.Context, db Execer) error

Insert inserts the Player to the database.

func (*Player) InsertIfNotExist

func (p *Player) InsertIfNotExist(ctx context.Context, db Executor) error

InsertOrUpdate inserts or updates the Player to the database.

func (*Player) InsertOrUpdate

func (p *Player) InsertOrUpdate(ctx context.Context, db Executor) error

InsertOrUpdate inserts or updates the Player to the database.

func (*Player) Update

func (p *Player) Update(ctx context.Context, db Execer) error

Update updates the Player in the database.

type Queryer

type Queryer interface {
	sqlx.Queryer
	sqlx.QueryerContext
}

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

func GetAllQuizRooms(ctx context.Context, db Queryer) ([]*QuizRoom, error)

GetAllQuizRooms gets all QuizRooms

func GetQuizRoom

func GetQuizRoom(ctx context.Context, db Queryer, key string) (*QuizRoom, error)

GetQuizRoom gets a QuizRoom by primary key

func GetQuizRooms

func GetQuizRooms(ctx context.Context, db Queryer, keys []string) ([]*QuizRoom, error)

GetQuizRooms gets QuizRoom list by primary keys

func QuizRoomByID

func QuizRoomByID(ctx context.Context, db Queryer, id string) (*QuizRoom, error)

QuizRoomByID retrieves a row from 'quiz_rooms' as a QuizRoom. Generated from index 'quiz_rooms_id_pkey'.

func (*QuizRoom) Delete

func (qr *QuizRoom) Delete(ctx context.Context, db Execer) error

Delete deletes the QuizRoom from the database.

func (*QuizRoom) Deleted

func (qr *QuizRoom) Deleted() bool

Deleted provides information if the QuizRoom has been deleted from the database.

func (*QuizRoom) Exists

func (qr *QuizRoom) Exists() bool

Exists determines if the QuizRoom exists in the database.

func (*QuizRoom) Insert

func (qr *QuizRoom) Insert(ctx context.Context, db Execer) error

Insert inserts the QuizRoom to the database.

func (*QuizRoom) InsertIfNotExist

func (qr *QuizRoom) InsertIfNotExist(ctx context.Context, db Executor) error

InsertOrUpdate inserts or updates the QuizRoom to the database.

func (*QuizRoom) InsertOrUpdate

func (qr *QuizRoom) InsertOrUpdate(ctx context.Context, db Executor) error

InsertOrUpdate inserts or updates the QuizRoom to the database.

func (*QuizRoom) Update

func (qr *QuizRoom) Update(ctx context.Context, db Execer) error

Update updates the QuizRoom in 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

func GetQuizRoomPlayer(ctx context.Context, db Queryer, key string) (*QuizRoomPlayer, error)

GetQuizRoomPlayer gets a QuizRoomPlayer by primary key

func GetQuizRoomPlayers

func GetQuizRoomPlayers(ctx context.Context, db Queryer, keys []string) ([]*QuizRoomPlayer, error)

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

func (qrp *QuizRoomPlayer) Player(ctx context.Context, db Executor) (*Player, error)

Player returns the Player associated with the QuizRoomPlayer's PlayerID (player_id).

Generated from foreign key 'quiz_room_players_ibfk_2'.

func (*QuizRoomPlayer) QuizRoom

func (qrp *QuizRoomPlayer) QuizRoom(ctx context.Context, db Executor) (*QuizRoom, error)

QuizRoom returns the QuizRoom associated with the QuizRoomPlayer's QuizRoomID (quiz_room_id).

Generated from foreign key 'quiz_room_players_ibfk_1'.

func (*QuizRoomPlayer) Update

func (qrp *QuizRoomPlayer) Update(ctx context.Context, db Execer) error

Update updates the QuizRoomPlayer in the database.

type ScannerValuer

type ScannerValuer interface {
	sql.Scanner
	driver.Valuer
}

ScannerValuer is the common interface for types that implement both the database/sql.Scanner and sql/driver.Valuer interfaces.

type Slice

type Slice []ScannerValuer

Slice is a slice of ScannerValuers.

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.

func (StringSlice) Value

func (ss StringSlice) Value() (driver.Value, error)

Value satisfies the driver.Valuer interface for StringSlice.

Jump to

Keyboard shortcuts

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