database

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db added in v1.0.1

type Db struct {
	Db *sql.DB
}

func (*Db) GetDbHandlers added in v1.0.1

func (db *Db) GetDbHandlers() (*DbHandlers, error)

type DbActivity

type DbActivity struct {
	Db
	PreparedStatements *DbActivityPreparedStatements
}

func (*DbActivity) CreateActivity added in v1.0.1

func (dbActivity *DbActivity) CreateActivity(instanceId string, membershipIds string, membershipType int, characterIds string) error

func (*DbActivity) GetActivitiesByInstanceId added in v1.0.1

func (dbActivity *DbActivity) GetActivitiesByInstanceId(instanceId string) ([]*DbActivityData, error)

func (*DbActivity) GetActivitiesByMembershipIdMembershipTypeCharacterId added in v1.0.1

func (dbActivity *DbActivity) GetActivitiesByMembershipIdMembershipTypeCharacterId(membershipId string, membershipType int, characterId string) ([]*DbActivityData, error)

func (*DbActivity) Init added in v1.0.1

func (dbActivity *DbActivity) Init(db *sql.DB) error

func (*DbActivity) UpdateActivityById added in v1.0.1

func (dbActivity *DbActivity) UpdateActivityById(id int, instanceId string, membershipIds string, membershipType int, characterIds string) error

type DbActivityData added in v1.0.1

type DbActivityData struct {
	Id             int
	InstanceId     string
	MembershipIds  string
	MembershipType int
	CharacterIds   string
}

type DbActivityHistory

type DbActivityHistory struct {
	Db
	PreparedStatements *DbActivityHistoryPreparedStatements
}

func (*DbActivityHistory) CreateActivityHistory added in v1.0.1

func (dbActivityHistory *DbActivityHistory) CreateActivityHistory(membershipId string, membershipType int, characterId string, activityCount int) error

func (*DbActivityHistory) GetActivityHistoryByMembershipIdMembershipTypeCharacterId added in v1.0.1

func (dbActivityHistory *DbActivityHistory) GetActivityHistoryByMembershipIdMembershipTypeCharacterId(membershipId string, membershipType int, characterId string) (*DbActivityHistoryData, error)

func (*DbActivityHistory) Init added in v1.0.1

func (dbActivityHistory *DbActivityHistory) Init(db *sql.DB) error

func (*DbActivityHistory) UpdateActivityHistoryById added in v1.0.1

func (dbActivityHistory *DbActivityHistory) UpdateActivityHistoryById(id int, membershipId string, membershipType int, characterId string, activityCount int) error

type DbActivityHistoryData added in v1.0.1

type DbActivityHistoryData struct {
	Id             int
	MembershipId   string
	MembershipType int
	CharacterId    string
	ActivityCount  int
}

type DbActivityHistoryPreparedStatements added in v1.0.1

type DbActivityHistoryPreparedStatements struct {
	GetByMembershipIdMembershipTypeCharacterId *sql.Stmt
	Create                                     *sql.Stmt
	UpdateById                                 *sql.Stmt
}

type DbActivityPreparedStatements added in v1.0.1

type DbActivityPreparedStatements struct {
	GetByInstanceId                            *sql.Stmt
	GetByMembershipIdMembershipTypeCharacterId *sql.Stmt
	Create                                     *sql.Stmt
	UpdateById                                 *sql.Stmt
}

type DbHandler added in v1.0.4

type DbHandler interface {
	Init(db *sql.DB) error
}

type DbHandlers added in v1.0.1

type DbHandlers struct {
	Profile               *DbProfile
	Activity              *DbActivity
	ActivityHistory       *DbActivityHistory
	PostGameCarnageReport *DbPostGameCarnageReport
}

type DbPostGameCarnageReport

type DbPostGameCarnageReport struct {
	Db
	PreparedStatements *DbPostGameCarnageReportPreparedStatements
}

func (*DbPostGameCarnageReport) CreatePostGameCarnageReport added in v1.0.1

func (dbPostGameCarnageReport *DbPostGameCarnageReport) CreatePostGameCarnageReport(instanceId string, json string) error

func (*DbPostGameCarnageReport) GetPostGameCarnageReportsByInstanceId added in v1.0.1

func (dbPostGameCarnageReport *DbPostGameCarnageReport) GetPostGameCarnageReportsByInstanceId(instanceId string) ([]*DbPostGameCarnageReportData, error)

func (*DbPostGameCarnageReport) Init added in v1.0.1

func (dbPostGameCarnageReport *DbPostGameCarnageReport) Init(db *sql.DB) error

func (*DbPostGameCarnageReport) UpdatePostGameCarnageReportById added in v1.0.1

func (dbPostGameCarnageReport *DbPostGameCarnageReport) UpdatePostGameCarnageReportById(id int, instanceId string, json string) error

type DbPostGameCarnageReportData added in v1.0.1

type DbPostGameCarnageReportData struct {
	Id         int
	InstanceId string
	Json       string
}

type DbPostGameCarnageReportPreparedStatements added in v1.0.1

type DbPostGameCarnageReportPreparedStatements struct {
	GetByInstanceId *sql.Stmt
	Create          *sql.Stmt
	UpdateById      *sql.Stmt
}

type DbProfile

type DbProfile struct {
	Db
	PreparedStatements *DbProfilePreparedStatements
}

func (*DbProfile) CreateProfile added in v1.0.1

func (dbProfile *DbProfile) CreateProfile(username string, membershipType int, membershipId string, json string) error

func (*DbProfile) GetProfileByMembershipId added in v1.0.1

func (dbProfile *DbProfile) GetProfileByMembershipId(membershipId string) ([]*DbProfileData, error)

func (*DbProfile) GetProfilesByUsername added in v1.0.1

func (dbProfile *DbProfile) GetProfilesByUsername(username string) ([]*DbProfileData, error)

func (*DbProfile) Init added in v1.0.1

func (dbProfile *DbProfile) Init(db *sql.DB) error

func (*DbProfile) UpdateProfileById added in v1.0.1

func (dbProfile *DbProfile) UpdateProfileById(id int, username string, membershipType int, membershipId string, json string) error

type DbProfileData added in v1.0.1

type DbProfileData struct {
	Id             int
	Username       string
	MembershipType int
	MembershipId   string
	Json           string
}

type DbProfilePreparedStatements added in v1.0.1

type DbProfilePreparedStatements struct {
	GetByUsername     *sql.Stmt
	GetByMembershipId *sql.Stmt
	Create            *sql.Stmt
	UpdateById        *sql.Stmt
}

Jump to

Keyboard shortcuts

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