dao

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EchoAllColumns            = echoAllColumns
	EchoColumnsWithoutDefault = echoColumnsWithoutDefault
	EchoColumnsWithDefault    = echoColumnsWithDefault
	EchoPrimaryKeyColumns     = echoPrimaryKeyColumns
	EchoGeneratedColumns      = echoGeneratedColumns
)

/////////////////////////////// BEGIN EXTENSIONS ///////////////////////////////// Expose table columns

View Source
var (
	UserGameSessionAllColumns            = userGameSessionAllColumns
	UserGameSessionColumnsWithoutDefault = userGameSessionColumnsWithoutDefault
	UserGameSessionColumnsWithDefault    = userGameSessionColumnsWithDefault
	UserGameSessionPrimaryKeyColumns     = userGameSessionPrimaryKeyColumns
	UserGameSessionGeneratedColumns      = userGameSessionGeneratedColumns
)

/////////////////////////////// BEGIN EXTENSIONS ///////////////////////////////// Expose table columns

View Source
var (
	UserJankenSessionHistoryAllColumns            = userJankenSessionHistoryAllColumns
	UserJankenSessionHistoryColumnsWithoutDefault = userJankenSessionHistoryColumnsWithoutDefault
	UserJankenSessionHistoryColumnsWithDefault    = userJankenSessionHistoryColumnsWithDefault
	UserJankenSessionHistoryPrimaryKeyColumns     = userJankenSessionHistoryPrimaryKeyColumns
	UserJankenSessionHistoryGeneratedColumns      = userJankenSessionHistoryGeneratedColumns
)

/////////////////////////////// BEGIN EXTENSIONS ///////////////////////////////// Expose table columns

View Source
var (
	UserJankenSessionAllColumns            = userJankenSessionAllColumns
	UserJankenSessionColumnsWithoutDefault = userJankenSessionColumnsWithoutDefault
	UserJankenSessionColumnsWithDefault    = userJankenSessionColumnsWithDefault
	UserJankenSessionPrimaryKeyColumns     = userJankenSessionPrimaryKeyColumns
	UserJankenSessionGeneratedColumns      = userJankenSessionGeneratedColumns
)

/////////////////////////////// BEGIN EXTENSIONS ///////////////////////////////// Expose table columns

View Source
var (
	UserAllColumns            = userAllColumns
	UserColumnsWithoutDefault = userColumnsWithoutDefault
	UserColumnsWithDefault    = userColumnsWithDefault
	UserPrimaryKeyColumns     = userPrimaryKeyColumns
	UserGeneratedColumns      = userGeneratedColumns
)

/////////////////////////////// BEGIN EXTENSIONS ///////////////////////////////// Expose table columns

View Source
var EchoColumns = struct {
	ID        string
	Message   string
	Timestamp string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Message:   "message",
	Timestamp: "timestamp",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var EchoRels = struct {
}{}

EchoRels is where relationship names are stored.

View Source
var EchoTableColumns = struct {
	ID        string
	Message   string
	Timestamp string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "echos.id",
	Message:   "echos.message",
	Timestamp: "echos.timestamp",
	CreatedAt: "echos.created_at",
	UpdatedAt: "echos.updated_at",
}
View Source
var EchoWhere = struct {
	ID        whereHelperstring
	Message   whereHelperstring
	Timestamp whereHelpertime_Time
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Message:   whereHelperstring{/* contains filtered or unexported fields */},
	Timestamp: whereHelpertime_Time{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("dao: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var TableNames = struct {
	Echos                      string
	UserGameSessions           string
	UserJankenSessionHistories string
	UserJankenSessions         string
	Users                      string
}{
	Echos:                      "echos",
	UserGameSessions:           "user_game_sessions",
	UserJankenSessionHistories: "user_janken_session_histories",
	UserJankenSessions:         "user_janken_sessions",
	Users:                      "users",
}
View Source
var UserColumns = struct {
	ID        string
	Status    string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "id",
	Status:    "status",
	CreatedAt: "created_at",
	UpdatedAt: "updated_at",
}
View Source
var UserGameSessionColumns = struct {
	ID         string
	UserID     string
	GameID     string
	Status     string
	Result     string
	Wager      string
	Payout     string
	StartedAt  string
	FinishedAt string
	CreatedAt  string
	UpdatedAt  string
}{
	ID:         "id",
	UserID:     "user_id",
	GameID:     "game_id",
	Status:     "status",
	Result:     "result",
	Wager:      "wager",
	Payout:     "payout",
	StartedAt:  "started_at",
	FinishedAt: "finished_at",
	CreatedAt:  "created_at",
	UpdatedAt:  "updated_at",
}
View Source
var UserGameSessionRels = struct {
	User                         string
	GameSessionUserJankenSession string
}{
	User:                         "User",
	GameSessionUserJankenSession: "GameSessionUserJankenSession",
}

UserGameSessionRels is where relationship names are stored.

View Source
var UserGameSessionTableColumns = struct {
	ID         string
	UserID     string
	GameID     string
	Status     string
	Result     string
	Wager      string
	Payout     string
	StartedAt  string
	FinishedAt string
	CreatedAt  string
	UpdatedAt  string
}{
	ID:         "user_game_sessions.id",
	UserID:     "user_game_sessions.user_id",
	GameID:     "user_game_sessions.game_id",
	Status:     "user_game_sessions.status",
	Result:     "user_game_sessions.result",
	Wager:      "user_game_sessions.wager",
	Payout:     "user_game_sessions.payout",
	StartedAt:  "user_game_sessions.started_at",
	FinishedAt: "user_game_sessions.finished_at",
	CreatedAt:  "user_game_sessions.created_at",
	UpdatedAt:  "user_game_sessions.updated_at",
}
View Source
var UserGameSessionWhere = struct {
	ID         whereHelperstring
	UserID     whereHelperstring
	GameID     whereHelperint
	Status     whereHelperint
	Result     whereHelperint
	Wager      whereHelperint
	Payout     whereHelperint
	StartedAt  whereHelpertime_Time
	FinishedAt whereHelpernull_Time
	CreatedAt  whereHelpertime_Time
	UpdatedAt  whereHelpertime_Time
}{
	ID:         whereHelperstring{/* contains filtered or unexported fields */},
	UserID:     whereHelperstring{/* contains filtered or unexported fields */},
	GameID:     whereHelperint{/* contains filtered or unexported fields */},
	Status:     whereHelperint{/* contains filtered or unexported fields */},
	Result:     whereHelperint{/* contains filtered or unexported fields */},
	Wager:      whereHelperint{/* contains filtered or unexported fields */},
	Payout:     whereHelperint{/* contains filtered or unexported fields */},
	StartedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	FinishedAt: whereHelpernull_Time{/* contains filtered or unexported fields */},
	CreatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:  whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var UserJankenSessionColumns = struct {
	GameSessionID string
	Seed          string
	CreatedAt     string
	UpdatedAt     string
}{
	GameSessionID: "game_session_id",
	Seed:          "seed",
	CreatedAt:     "created_at",
	UpdatedAt:     "updated_at",
}
View Source
var UserJankenSessionHistoryColumns = struct {
	GameSessionID string
	Turn          string
	MyHand        string
	OpponentHand  string
	CreatedAt     string
	UpdatedAt     string
}{
	GameSessionID: "game_session_id",
	Turn:          "turn",
	MyHand:        "my_hand",
	OpponentHand:  "opponent_hand",
	CreatedAt:     "created_at",
	UpdatedAt:     "updated_at",
}
View Source
var UserJankenSessionHistoryRels = struct {
	GameSession string
}{
	GameSession: "GameSession",
}

UserJankenSessionHistoryRels is where relationship names are stored.

View Source
var UserJankenSessionHistoryTableColumns = struct {
	GameSessionID string
	Turn          string
	MyHand        string
	OpponentHand  string
	CreatedAt     string
	UpdatedAt     string
}{
	GameSessionID: "user_janken_session_histories.game_session_id",
	Turn:          "user_janken_session_histories.turn",
	MyHand:        "user_janken_session_histories.my_hand",
	OpponentHand:  "user_janken_session_histories.opponent_hand",
	CreatedAt:     "user_janken_session_histories.created_at",
	UpdatedAt:     "user_janken_session_histories.updated_at",
}
View Source
var UserJankenSessionHistoryWhere = struct {
	GameSessionID whereHelperstring
	Turn          whereHelperint
	MyHand        whereHelperint
	OpponentHand  whereHelperint
	CreatedAt     whereHelpertime_Time
	UpdatedAt     whereHelpertime_Time
}{
	GameSessionID: whereHelperstring{/* contains filtered or unexported fields */},
	Turn:          whereHelperint{/* contains filtered or unexported fields */},
	MyHand:        whereHelperint{/* contains filtered or unexported fields */},
	OpponentHand:  whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var UserJankenSessionRels = struct {
	GameSession                           string
	GameSessionUserJankenSessionHistories string
}{
	GameSession:                           "GameSession",
	GameSessionUserJankenSessionHistories: "GameSessionUserJankenSessionHistories",
}

UserJankenSessionRels is where relationship names are stored.

View Source
var UserJankenSessionTableColumns = struct {
	GameSessionID string
	Seed          string
	CreatedAt     string
	UpdatedAt     string
}{
	GameSessionID: "user_janken_sessions.game_session_id",
	Seed:          "user_janken_sessions.seed",
	CreatedAt:     "user_janken_sessions.created_at",
	UpdatedAt:     "user_janken_sessions.updated_at",
}
View Source
var UserJankenSessionWhere = struct {
	GameSessionID whereHelperstring
	Seed          whereHelperint
	CreatedAt     whereHelpertime_Time
	UpdatedAt     whereHelpertime_Time
}{
	GameSessionID: whereHelperstring{/* contains filtered or unexported fields */},
	Seed:          whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt:     whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var UserRels = struct {
	UserGameSessions string
}{
	UserGameSessions: "UserGameSessions",
}

UserRels is where relationship names are stored.

View Source
var UserTableColumns = struct {
	ID        string
	Status    string
	CreatedAt string
	UpdatedAt string
}{
	ID:        "users.id",
	Status:    "users.status",
	CreatedAt: "users.created_at",
	UpdatedAt: "users.updated_at",
}
View Source
var UserWhere = struct {
	ID        whereHelperstring
	Status    whereHelperint
	CreatedAt whereHelpertime_Time
	UpdatedAt whereHelpertime_Time
}{
	ID:        whereHelperstring{/* contains filtered or unexported fields */},
	Status:    whereHelperint{/* contains filtered or unexported fields */},
	CreatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
	UpdatedAt: whereHelpertime_Time{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddEchoHook

func AddEchoHook(hookPoint boil.HookPoint, echoHook EchoHook)

AddEchoHook registers your hook function for all future operations.

func AddUserGameSessionHook

func AddUserGameSessionHook(hookPoint boil.HookPoint, userGameSessionHook UserGameSessionHook)

AddUserGameSessionHook registers your hook function for all future operations.

func AddUserHook

func AddUserHook(hookPoint boil.HookPoint, userHook UserHook)

AddUserHook registers your hook function for all future operations.

func AddUserJankenSessionHistoryHook added in v0.2.0

func AddUserJankenSessionHistoryHook(hookPoint boil.HookPoint, userJankenSessionHistoryHook UserJankenSessionHistoryHook)

AddUserJankenSessionHistoryHook registers your hook function for all future operations.

func AddUserJankenSessionHook added in v0.2.0

func AddUserJankenSessionHook(hookPoint boil.HookPoint, userJankenSessionHook UserJankenSessionHook)

AddUserJankenSessionHook registers your hook function for all future operations.

func EchoExists

func EchoExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

EchoExists checks if the Echo row exists.

func Echos

func Echos(mods ...qm.QueryMod) echoQuery

Echos retrieves all the records using an executor.

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func UserExists

func UserExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

UserExists checks if the User row exists.

func UserGameSessionExists

func UserGameSessionExists(ctx context.Context, exec boil.ContextExecutor, iD string) (bool, error)

UserGameSessionExists checks if the UserGameSession row exists.

func UserGameSessions

func UserGameSessions(mods ...qm.QueryMod) userGameSessionQuery

UserGameSessions retrieves all the records using an executor.

func UserJankenSessionExists added in v0.2.0

func UserJankenSessionExists(ctx context.Context, exec boil.ContextExecutor, gameSessionID string) (bool, error)

UserJankenSessionExists checks if the UserJankenSession row exists.

func UserJankenSessionHistories added in v0.2.0

func UserJankenSessionHistories(mods ...qm.QueryMod) userJankenSessionHistoryQuery

UserJankenSessionHistories retrieves all the records using an executor.

func UserJankenSessionHistoryExists added in v0.2.0

func UserJankenSessionHistoryExists(ctx context.Context, exec boil.ContextExecutor, gameSessionID string, turn int) (bool, error)

UserJankenSessionHistoryExists checks if the UserJankenSessionHistory row exists.

func UserJankenSessions added in v0.2.0

func UserJankenSessions(mods ...qm.QueryMod) userJankenSessionQuery

UserJankenSessions retrieves all the records using an executor.

func Users

func Users(mods ...qm.QueryMod) userQuery

Users retrieves all the records using an executor.

Types

type Echo

type Echo struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Message   string    `boil:"message" json:"message" toml:"message" yaml:"message"`
	Timestamp time.Time `boil:"timestamp" json:"timestamp" toml:"timestamp" yaml:"timestamp"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *echoR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L echoL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

Echo is an object representing the database table.

func FindEcho

func FindEcho(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*Echo, error)

FindEcho retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Echo) Delete

func (o *Echo) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Echo record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Echo) Exists

func (o *Echo) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the Echo row exists.

func (*Echo) Insert

func (o *Echo) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Echo) Reload

func (o *Echo) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Echo) Update

func (o *Echo) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Echo. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Echo) Upsert

func (o *Echo) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type EchoHook

type EchoHook func(context.Context, boil.ContextExecutor, *Echo) error

EchoHook is the signature for custom Echo hook methods

type EchoSlice

type EchoSlice []*Echo

EchoSlice is an alias for a slice of pointers to Echo. This should almost always be used instead of []Echo.

func (EchoSlice) DeleteAll

func (o EchoSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (EchoSlice) InsertAll

func (o EchoSlice) InsertAll(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

InsertAll inserts all rows with the specified column values, using an executor.

func (*EchoSlice) ReloadAll

func (o *EchoSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (EchoSlice) UpdateAll

func (o EchoSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (EchoSlice) UpsertAll

func (o EchoSlice) UpsertAll(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) (int64, error)

UpsertAll inserts or updates all rows Currently it doesn't support "NoContext" and "NoRowsAffected"

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type UpsertOptionFunc

type UpsertOptionFunc func(o *UpsertOptions)

func UpsertConflictTarget

func UpsertConflictTarget(conflictTarget string) UpsertOptionFunc

func UpsertUpdateSet

func UpsertUpdateSet(updateSet string) UpsertOptionFunc

type UpsertOptions

type UpsertOptions struct {
	// contains filtered or unexported fields
}

type User

type User struct {
	ID        string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	Status    int       `boil:"status" json:"status" toml:"status" yaml:"status"`
	CreatedAt time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *userR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

User is an object representing the database table.

func FindUser

func FindUser(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*User, error)

FindUser retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*User) AddUserGameSessions

func (o *User) AddUserGameSessions(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*UserGameSession) error

AddUserGameSessions adds the given related objects to the existing relationships of the user, optionally inserting them as new records. Appends related to o.R.UserGameSessions. Sets related.R.User appropriately.

func (*User) Delete

func (o *User) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single User record with an executor. Delete will match against the primary key column to find the record to delete.

func (*User) Exists

func (o *User) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the User row exists.

func (*User) Insert

func (o *User) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*User) Reload

func (o *User) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*User) Update

func (o *User) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the User. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*User) Upsert

func (o *User) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*User) UserGameSessions

func (o *User) UserGameSessions(mods ...qm.QueryMod) userGameSessionQuery

UserGameSessions retrieves all the user_game_session's UserGameSessions with an executor.

type UserGameSession

type UserGameSession struct {
	ID         string    `boil:"id" json:"id" toml:"id" yaml:"id"`
	UserID     string    `boil:"user_id" json:"user_id" toml:"user_id" yaml:"user_id"`
	GameID     int       `boil:"game_id" json:"game_id" toml:"game_id" yaml:"game_id"`
	Status     int       `boil:"status" json:"status" toml:"status" yaml:"status"`
	Result     int       `boil:"result" json:"result" toml:"result" yaml:"result"`
	Wager      int       `boil:"wager" json:"wager" toml:"wager" yaml:"wager"`
	Payout     int       `boil:"payout" json:"payout" toml:"payout" yaml:"payout"`
	StartedAt  time.Time `boil:"started_at" json:"started_at" toml:"started_at" yaml:"started_at"`
	FinishedAt null.Time `boil:"finished_at" json:"finished_at,omitempty" toml:"finished_at" yaml:"finished_at,omitempty"`
	CreatedAt  time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt  time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *userGameSessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userGameSessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

UserGameSession is an object representing the database table.

func FindUserGameSession

func FindUserGameSession(ctx context.Context, exec boil.ContextExecutor, iD string, selectCols ...string) (*UserGameSession, error)

FindUserGameSession retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*UserGameSession) Delete

func (o *UserGameSession) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single UserGameSession record with an executor. Delete will match against the primary key column to find the record to delete.

func (*UserGameSession) Exists

func (o *UserGameSession) Exists(ctx context.Context, exec boil.ContextExecutor) (bool, error)

Exists checks if the UserGameSession row exists.

func (*UserGameSession) GameSessionUserJankenSession added in v0.2.0

func (o *UserGameSession) GameSessionUserJankenSession(mods ...qm.QueryMod) userJankenSessionQuery

GameSessionUserJankenSession pointed to by the foreign key.

func (*UserGameSession) Insert

func (o *UserGameSession) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*UserGameSession) Reload

Reload refetches the object from the database using the primary keys with an executor.

func (*UserGameSession) SetGameSessionUserJankenSession added in v0.2.0

func (o *UserGameSession) SetGameSessionUserJankenSession(ctx context.Context, exec boil.ContextExecutor, insert bool, related *UserJankenSession) error

SetGameSessionUserJankenSession of the userGameSession to the related item. Sets o.R.GameSessionUserJankenSession to related. Adds o to related.R.GameSession.

func (*UserGameSession) SetUser

func (o *UserGameSession) SetUser(ctx context.Context, exec boil.ContextExecutor, insert bool, related *User) error

SetUser of the userGameSession to the related item. Sets o.R.User to related. Adds o to related.R.UserGameSessions.

func (*UserGameSession) Update

func (o *UserGameSession) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the UserGameSession. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*UserGameSession) Upsert

func (o *UserGameSession) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

func (*UserGameSession) User

func (o *UserGameSession) User(mods ...qm.QueryMod) userQuery

User pointed to by the foreign key.

type UserGameSessionHook

type UserGameSessionHook func(context.Context, boil.ContextExecutor, *UserGameSession) error

UserGameSessionHook is the signature for custom UserGameSession hook methods

type UserGameSessionSlice

type UserGameSessionSlice []*UserGameSession

UserGameSessionSlice is an alias for a slice of pointers to UserGameSession. This should almost always be used instead of []UserGameSession.

func (UserGameSessionSlice) DeleteAll

DeleteAll deletes all rows in the slice, using an executor.

func (UserGameSessionSlice) InsertAll

func (o UserGameSessionSlice) InsertAll(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

InsertAll inserts all rows with the specified column values, using an executor.

func (*UserGameSessionSlice) ReloadAll

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserGameSessionSlice) UpdateAll

func (o UserGameSessionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (UserGameSessionSlice) UpsertAll

func (o UserGameSessionSlice) UpsertAll(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) (int64, error)

UpsertAll inserts or updates all rows Currently it doesn't support "NoContext" and "NoRowsAffected"

type UserHook

type UserHook func(context.Context, boil.ContextExecutor, *User) error

UserHook is the signature for custom User hook methods

type UserJankenSession added in v0.2.0

type UserJankenSession struct {
	GameSessionID string    `boil:"game_session_id" json:"game_session_id" toml:"game_session_id" yaml:"game_session_id"`
	Seed          int       `boil:"seed" json:"seed" toml:"seed" yaml:"seed"`
	CreatedAt     time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt     time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *userJankenSessionR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userJankenSessionL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

UserJankenSession is an object representing the database table.

func FindUserJankenSession added in v0.2.0

func FindUserJankenSession(ctx context.Context, exec boil.ContextExecutor, gameSessionID string, selectCols ...string) (*UserJankenSession, error)

FindUserJankenSession retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*UserJankenSession) AddGameSessionUserJankenSessionHistories added in v0.2.0

func (o *UserJankenSession) AddGameSessionUserJankenSessionHistories(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*UserJankenSessionHistory) error

AddGameSessionUserJankenSessionHistories adds the given related objects to the existing relationships of the user_janken_session, optionally inserting them as new records. Appends related to o.R.GameSessionUserJankenSessionHistories. Sets related.R.GameSession appropriately.

func (*UserJankenSession) Delete added in v0.2.0

Delete deletes a single UserJankenSession record with an executor. Delete will match against the primary key column to find the record to delete.

func (*UserJankenSession) Exists added in v0.2.0

Exists checks if the UserJankenSession row exists.

func (*UserJankenSession) GameSession added in v0.2.0

func (o *UserJankenSession) GameSession(mods ...qm.QueryMod) userGameSessionQuery

GameSession pointed to by the foreign key.

func (*UserJankenSession) GameSessionUserJankenSessionHistories added in v0.2.0

func (o *UserJankenSession) GameSessionUserJankenSessionHistories(mods ...qm.QueryMod) userJankenSessionHistoryQuery

GameSessionUserJankenSessionHistories retrieves all the user_janken_session_history's UserJankenSessionHistories with an executor via game_session_id column.

func (*UserJankenSession) Insert added in v0.2.0

func (o *UserJankenSession) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*UserJankenSession) Reload added in v0.2.0

Reload refetches the object from the database using the primary keys with an executor.

func (*UserJankenSession) SetGameSession added in v0.2.0

func (o *UserJankenSession) SetGameSession(ctx context.Context, exec boil.ContextExecutor, insert bool, related *UserGameSession) error

SetGameSession of the userJankenSession to the related item. Sets o.R.GameSession to related. Adds o to related.R.GameSessionUserJankenSession.

func (*UserJankenSession) Update added in v0.2.0

func (o *UserJankenSession) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the UserJankenSession. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*UserJankenSession) Upsert added in v0.2.0

func (o *UserJankenSession) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type UserJankenSessionHistory added in v0.2.0

type UserJankenSessionHistory struct {
	GameSessionID string    `boil:"game_session_id" json:"game_session_id" toml:"game_session_id" yaml:"game_session_id"`
	Turn          int       `boil:"turn" json:"turn" toml:"turn" yaml:"turn"`
	MyHand        int       `boil:"my_hand" json:"my_hand" toml:"my_hand" yaml:"my_hand"`
	OpponentHand  int       `boil:"opponent_hand" json:"opponent_hand" toml:"opponent_hand" yaml:"opponent_hand"`
	CreatedAt     time.Time `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt     time.Time `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`

	R *userJankenSessionHistoryR `boil:"-" json:"-" toml:"-" yaml:"-"`
	L userJankenSessionHistoryL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

UserJankenSessionHistory is an object representing the database table.

func FindUserJankenSessionHistory added in v0.2.0

func FindUserJankenSessionHistory(ctx context.Context, exec boil.ContextExecutor, gameSessionID string, turn int, selectCols ...string) (*UserJankenSessionHistory, error)

FindUserJankenSessionHistory retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*UserJankenSessionHistory) Delete added in v0.2.0

Delete deletes a single UserJankenSessionHistory record with an executor. Delete will match against the primary key column to find the record to delete.

func (*UserJankenSessionHistory) Exists added in v0.2.0

Exists checks if the UserJankenSessionHistory row exists.

func (*UserJankenSessionHistory) GameSession added in v0.2.0

func (o *UserJankenSessionHistory) GameSession(mods ...qm.QueryMod) userJankenSessionQuery

GameSession pointed to by the foreign key.

func (*UserJankenSessionHistory) Insert added in v0.2.0

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*UserJankenSessionHistory) Reload added in v0.2.0

Reload refetches the object from the database using the primary keys with an executor.

func (*UserJankenSessionHistory) SetGameSession added in v0.2.0

func (o *UserJankenSessionHistory) SetGameSession(ctx context.Context, exec boil.ContextExecutor, insert bool, related *UserJankenSession) error

SetGameSession of the userJankenSessionHistory to the related item. Sets o.R.GameSession to related. Adds o to related.R.GameSessionUserJankenSessionHistories.

func (*UserJankenSessionHistory) Update added in v0.2.0

Update uses an executor to update the UserJankenSessionHistory. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*UserJankenSessionHistory) Upsert added in v0.2.0

func (o *UserJankenSessionHistory) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns, opts ...UpsertOptionFunc) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type UserJankenSessionHistoryHook added in v0.2.0

type UserJankenSessionHistoryHook func(context.Context, boil.ContextExecutor, *UserJankenSessionHistory) error

UserJankenSessionHistoryHook is the signature for custom UserJankenSessionHistory hook methods

type UserJankenSessionHistorySlice added in v0.2.0

type UserJankenSessionHistorySlice []*UserJankenSessionHistory

UserJankenSessionHistorySlice is an alias for a slice of pointers to UserJankenSessionHistory. This should almost always be used instead of []UserJankenSessionHistory.

func (UserJankenSessionHistorySlice) DeleteAll added in v0.2.0

DeleteAll deletes all rows in the slice, using an executor.

func (UserJankenSessionHistorySlice) InsertAll added in v0.2.0

InsertAll inserts all rows with the specified column values, using an executor.

func (*UserJankenSessionHistorySlice) ReloadAll added in v0.2.0

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserJankenSessionHistorySlice) UpdateAll added in v0.2.0

UpdateAll updates all rows with the specified column values, using an executor.

func (UserJankenSessionHistorySlice) UpsertAll added in v0.2.0

func (o UserJankenSessionHistorySlice) UpsertAll(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) (int64, error)

UpsertAll inserts or updates all rows Currently it doesn't support "NoContext" and "NoRowsAffected"

type UserJankenSessionHook added in v0.2.0

type UserJankenSessionHook func(context.Context, boil.ContextExecutor, *UserJankenSession) error

UserJankenSessionHook is the signature for custom UserJankenSession hook methods

type UserJankenSessionSlice added in v0.2.0

type UserJankenSessionSlice []*UserJankenSession

UserJankenSessionSlice is an alias for a slice of pointers to UserJankenSession. This should almost always be used instead of []UserJankenSession.

func (UserJankenSessionSlice) DeleteAll added in v0.2.0

DeleteAll deletes all rows in the slice, using an executor.

func (UserJankenSessionSlice) InsertAll added in v0.2.0

func (o UserJankenSessionSlice) InsertAll(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

InsertAll inserts all rows with the specified column values, using an executor.

func (*UserJankenSessionSlice) ReloadAll added in v0.2.0

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserJankenSessionSlice) UpdateAll added in v0.2.0

func (o UserJankenSessionSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (UserJankenSessionSlice) UpsertAll added in v0.2.0

func (o UserJankenSessionSlice) UpsertAll(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) (int64, error)

UpsertAll inserts or updates all rows Currently it doesn't support "NoContext" and "NoRowsAffected"

type UserSlice

type UserSlice []*User

UserSlice is an alias for a slice of pointers to User. This should almost always be used instead of []User.

func (UserSlice) DeleteAll

func (o UserSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (UserSlice) InsertAll

func (o UserSlice) InsertAll(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

InsertAll inserts all rows with the specified column values, using an executor.

func (*UserSlice) ReloadAll

func (o *UserSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (UserSlice) UpdateAll

func (o UserSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

func (UserSlice) UpsertAll

func (o UserSlice) UpsertAll(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) (int64, error)

UpsertAll inserts or updates all rows Currently it doesn't support "NoContext" and "NoRowsAffected"

Jump to

Keyboard shortcuts

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