sqlc

package
v0.0.0-...-9ddcce9 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Comment

type Comment struct {
	ID       int64
	ParentID sql.NullInt64
	EventID  int64
	UserID   int64
	Comment  string
	PostedAt time.Time
}

type CreateEventParams

type CreateEventParams struct {
	Title  string
	Start  time.Time
	Place  string
	Open   time.Time
	Close  time.Time
	Author int64
}

type CreateEventUserParams

type CreateEventUserParams struct {
	EventID   int64
	UserID    int64
	Cancelled bool
}

type CreateUserParams

type CreateUserParams struct {
	Uid  string
	Name string
}

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 Event

type Event struct {
	ID     int64
	Title  string
	Start  time.Time
	Place  string
	Open   time.Time
	Close  time.Time
	Author int64
}

type EventsUser

type EventsUser struct {
	ID        int64
	EventID   int64
	UserID    int64
	Cancelled bool
}

type ListCommentsTreeRow

type ListCommentsTreeRow struct {
	ID       int64
	ParentID sql.NullInt64
	EventID  int64
	UserID   int64
	Comment  string
	PostedAt time.Time
}

type ListEventUsersRow

type ListEventUsersRow struct {
	ID        int64
	EventID   int64
	UserID    int64
	Cancelled bool
	Name      string
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateEvent

func (q *Queries) CreateEvent(ctx context.Context, arg CreateEventParams) (sql.Result, error)

func (*Queries) CreateEventUser

func (q *Queries) CreateEventUser(ctx context.Context, arg CreateEventUserParams) (sql.Result, error)

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (sql.Result, error)

func (*Queries) GetEvent

func (q *Queries) GetEvent(ctx context.Context, id int64) (Event, error)

func (*Queries) GetUserByUID

func (q *Queries) GetUserByUID(ctx context.Context, uid string) (User, error)

func (*Queries) ListCommentsTree

func (q *Queries) ListCommentsTree(ctx context.Context, id int64) ([]ListCommentsTreeRow, error)

func (*Queries) ListEventUsers

func (q *Queries) ListEventUsers(ctx context.Context, eventID int64) ([]ListEventUsersRow, error)

func (*Queries) ListEvents

func (q *Queries) ListEvents(ctx context.Context) ([]Event, error)

func (*Queries) ListUsers

func (q *Queries) ListUsers(ctx context.Context) ([]User, error)

func (*Queries) WithTx

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

type Upload

type Upload struct {
	ID      int64
	EventID int64
	Url     string
}

type User

type User struct {
	ID   int64
	Uid  string
	Name string
}

Jump to

Keyboard shortcuts

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