db

package
v0.0.0-...-431350c Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemberBlogBind

type MemberBlogBind struct {
	models.Blog   `boil:",bind"`
	models.Member `boil:",bind"`
}

type MemberInfoBind

type MemberInfoBind struct {
	models.MemberInfo `boil:",bind"`
	models.Member     `boil:",bind"`
	models.Group      `boil:",bind"`
}

Custom struct using two generated structs

type PositionMember

type PositionMember struct {
	models.Position `boil:",bind"`
	models.Member   `boil:",bind"`
}

Member まで持ってきているのは過剰かも。 NameJa など string でやろうとしたらできなかった

type PositionMemberBind

type PositionMemberBind struct {
	models.Position   `boil:",bind"`
	models.Member     `boil:",bind"`
	models.MemberInfo `boil:",bind"`
}

type PositionSongsBind

type PositionSongsBind struct {
	models.Position `boil:",bind"`
	models.Song     `boil:",bind"`
	models.Member   `boil:",bind"`
}

Member まで持ってきているのは過剰かも。 NameJa など string でやろうとしたらできなかった

type PositionsInfoBind

type PositionsInfoBind struct {
	models.MemberInfo `boil:",bind"`
	models.Member     `boil:",bind"`
}

Custom struct using two generated structs

type Querier

type Querier interface {
	InsertApiKey(ctx context.Context, key string) error
	FindApiKeyByName(ctx context.Context, key string) (*models.APIKey, error)
	GetAllGroups(ctx context.Context) ([]*models.Group, error)
	GetAllBlogs(ctx context.Context, groupName string) ([]MemberBlogBind, error)
	GetAllFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)
	GetFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)
	FindGroupByName(ctx context.Context, groupName string) (*models.Group, error)
	FindLocaleByName(ctx context.Context, name string) (*models.Locale, error)
	GetAllMemberInfos(ctx context.Context, groupName string, localeId int, sortKey util.SortKey, desc bool) ([]MemberInfoBind, error)
	GetAllPositions(ctx context.Context, groupName string) ([]MemberInfoBind, error)
	GetPositionFromTitle(ctx context.Context, title string) ([]PositionMemberBind, error)
	GetAllSongs(ctx context.Context, groupName string) (models.SongSlice, error)
	GetCenter(ctx context.Context, title string) []string
}

type SongFormationsBind

type SongFormationsBind struct {
	models.Song      `boil:",bind"`
	models.Formation `boil:",bind"`
	Center           string `json:"center" boil:",bind"`
}

Custom struct using two generated structs

type SqlQuerier

type SqlQuerier struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

Implementation of Querier interface

func NewQuerier

func NewQuerier(config util.Config, logger util.Logger) (*SqlQuerier, error)

func (*SqlQuerier) FindApiKeyByName

func (q *SqlQuerier) FindApiKeyByName(ctx context.Context, key string) (*models.APIKey, error)

func (*SqlQuerier) FindGroupByName

func (q *SqlQuerier) FindGroupByName(ctx context.Context, groupName string) (*models.Group, error)

func (*SqlQuerier) FindLocaleByName

func (q *SqlQuerier) FindLocaleByName(ctx context.Context, name string) (*models.Locale, error)

func (*SqlQuerier) GetAllBlogs

func (q *SqlQuerier) GetAllBlogs(ctx context.Context, groupName string) ([]MemberBlogBind, error)

func (*SqlQuerier) GetAllFormations

func (q *SqlQuerier) GetAllFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)

func (*SqlQuerier) GetAllGroups

func (q *SqlQuerier) GetAllGroups(ctx context.Context) ([]*models.Group, error)

Get all groups from Database.

func (*SqlQuerier) GetAllMemberInfos

func (q *SqlQuerier) GetAllMemberInfos(ctx context.Context, groupName string, locale int, sortKey util.SortKey, desc bool) ([]MemberInfoBind, error)

func (*SqlQuerier) GetAllPositions

func (q *SqlQuerier) GetAllPositions(ctx context.Context, groupName string) ([]MemberInfoBind, error)

func (*SqlQuerier) GetAllSongs

func (q *SqlQuerier) GetAllSongs(ctx context.Context, groupName string) (models.SongSlice, error)

func (*SqlQuerier) GetCenter

func (q *SqlQuerier) GetCenter(ctx context.Context, title string) []string

func (*SqlQuerier) GetFormations

func (q *SqlQuerier) GetFormations(ctx context.Context, groupName string) ([]PositionSongsBind, error)

func (*SqlQuerier) GetPositionFromTitle

func (q *SqlQuerier) GetPositionFromTitle(ctx context.Context, title string) ([]PositionMemberBind, error)

func (*SqlQuerier) InsertApiKey

func (q *SqlQuerier) InsertApiKey(ctx context.Context, key string) error

func (*SqlQuerier) InsertLocale

func (q *SqlQuerier) InsertLocale(ctx context.Context, name string) error

Directories

Path Synopsis
Package mockdb is a generated GoMock package.
Package mockdb is a generated GoMock package.

Jump to

Keyboard shortcuts

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