Help us shape the future of Go! Take the 2026 Go Developer Survey

kamksqlc

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteInjuryByIDParams

type DeleteInjuryByIDParams struct {
	UserID   int32
	InjuryID int32
}

type DeleteQuestionnaireByIDParams

type DeleteQuestionnaireByIDParams struct {
	UserID int32
	ID     int64
}

type GetQuestionnairesByUserRow

type GetQuestionnairesByUserRow struct {
	ID        int64
	UserID    int32
	QueryType int32
	Answers   string
	Comment   string
	Timestamp time.Time
	Meta      string
}

type Injury

type Injury struct {
	UserID      int32
	InjuryType  int32
	Severity    int32
	PainLevel   int32
	Description string
	DateStart   time.Time
	Status      int32
	DateEnd     sql.NullTime
	InjuryID    int32
	Meta        string
}

type InsertInjuryParams

type InsertInjuryParams struct {
	UserID      int32
	InjuryType  int32
	Severity    int32
	PainLevel   int32
	Description string
	InjuryID    int32
	Meta        string
}

type InsertQuestionnaireParams

type InsertQuestionnaireParams struct {
	UserID    int32
	QueryType int32
	Answers   string
	Comment   string
	Meta      string
}

type IsQuizDoneTodayParams

type IsQuizDoneTodayParams struct {
	UserID      int32
	QueryType   int32
	Timestamp   time.Time
	Timestamp_2 time.Time
}

type IsQuizDoneTodayRow

type IsQuizDoneTodayRow struct {
	ID        int64
	UserID    int32
	QueryType int32
	Answers   string
	Comment   string
	Timestamp time.Time
	Meta      string
}

type MarkInjuryRecoveredByIDParams

type MarkInjuryRecoveredByIDParams struct {
	InjuryID int32
	UserID   int32
}

type Queries

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

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) DeleteInjuryByID

func (q *Queries) DeleteInjuryByID(ctx context.Context, arg DeleteInjuryByIDParams) (int64, error)

func (*Queries) DeleteQuestionnaireByID

func (q *Queries) DeleteQuestionnaireByID(ctx context.Context, arg DeleteQuestionnaireByIDParams) (int64, error)

func (*Queries) GetActiveInjuriesByUser

func (q *Queries) GetActiveInjuriesByUser(ctx context.Context, userID int32) ([]Injury, error)

func (*Queries) GetMaxInjuryIDForUser

func (q *Queries) GetMaxInjuryIDForUser(ctx context.Context, userID int32) (int32, error)

func (*Queries) GetQuestionnairesByUser

func (q *Queries) GetQuestionnairesByUser(ctx context.Context, userID int32) ([]GetQuestionnairesByUserRow, error)

func (*Queries) InsertInjury

func (q *Queries) InsertInjury(ctx context.Context, arg InsertInjuryParams) error

func (*Queries) InsertQuestionnaire

func (q *Queries) InsertQuestionnaire(ctx context.Context, arg InsertQuestionnaireParams) (int64, error)

func (*Queries) IsQuizDoneToday

func (q *Queries) IsQuizDoneToday(ctx context.Context, arg IsQuizDoneTodayParams) ([]IsQuizDoneTodayRow, error)

func (*Queries) MarkInjuryRecoveredByID

func (q *Queries) MarkInjuryRecoveredByID(ctx context.Context, arg MarkInjuryRecoveredByIDParams) error

func (*Queries) UpdateQuestionnaireByID

func (q *Queries) UpdateQuestionnaireByID(ctx context.Context, arg UpdateQuestionnaireByIDParams) (int64, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Query

type Query struct {
	UserID    int32
	QueryType int32
	Answers   string
	Comment   string
	Timestamp time.Time
	Meta      string
	ID        int64
}

type UpdateQuestionnaireByIDParams

type UpdateQuestionnaireByIDParams struct {
	UserID  int32
	ID      int64
	Answers string
	Comment string
}

type User

type User struct {
	Username          sql.NullInt32
	RoleID            sql.NullInt32
	Password          sql.NullString
	Email             sql.NullString
	SharePermission   sql.NullInt32
	CollectPermission sql.NullInt32
	EulaAccepted      sql.NullInt32
	CreateTime        sql.NullTime
	Message           sql.NullString
	Salt              sql.NullString
}

Jump to

Keyboard shortcuts

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