Documentation ¶
Index ¶
- func Tx(ctx context.Context, db *Db, ...) error
- func TxR[T any](ctx context.Context, db *Db, ...) (*T, error)
- type Author
- type ChangeAuthorEmailParams
- type ChangeCommentBodyParams
- type ChangeEntryBodyParams
- type ChangeEntryTitleParams
- type Comment
- type CreateCommentParams
- type CreateEntryParams
- type DBTX
- type Db
- type Entry
- type Queries
- func (q *Queries) ChangeAuthorEmail(ctx context.Context, arg ChangeAuthorEmailParams) error
- func (q *Queries) ChangeCommentBody(ctx context.Context, arg ChangeCommentBodyParams) error
- func (q *Queries) ChangeEntryBody(ctx context.Context, arg ChangeEntryBodyParams) error
- func (q *Queries) ChangeEntryTitle(ctx context.Context, arg ChangeEntryTitleParams) error
- func (q *Queries) CreateAuthor(ctx context.Context, email string) (Author, error)
- func (q *Queries) CreateComment(ctx context.Context, arg CreateCommentParams) (Comment, error)
- func (q *Queries) CreateEntry(ctx context.Context, arg CreateEntryParams) (Entry, error)
- func (q *Queries) DeleteAuthor(ctx context.Context, id int64) error
- func (q *Queries) DeleteComment(ctx context.Context, id int64) error
- func (q *Queries) DeleteEntry(ctx context.Context, id int64) error
- func (q *Queries) GetCommentsByEntry(ctx context.Context, entryID int64) ([]Comment, error)
- func (q *Queries) GetEntryByAuthor(ctx context.Context, authorID int64) ([]Entry, error)
- func (q *Queries) UpdateTS(ctx context.Context, arg UpdateTSParams) error
- func (q *Queries) WithTx(tx *sql.Tx) *Queries
- type SqliteDateTime
- type UpdateTSParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Author ¶
type Author struct { ID int64 Email string CreatedAt SqliteDateTime UpdatedAt SqliteDateTime }
type ChangeAuthorEmailParams ¶
type ChangeCommentBodyParams ¶
type ChangeCommentBodyParams struct { Body sql.NullString ID int64 }
type ChangeEntryBodyParams ¶
type ChangeEntryBodyParams struct { Body sql.NullString ID int64 }
type ChangeEntryTitleParams ¶
type Comment ¶
type Comment struct { ID int64 Body string EntryID int64 AuthorID int64 CreatedAt SqliteDateTime UpdatedAt SqliteDateTime }
type CreateCommentParams ¶
type CreateEntryParams ¶
type CreateEntryParams struct { Title string Body sql.NullString AuthorID int64 }
type Db ¶
func (*Db) Connection ¶
type Entry ¶
type Entry struct { ID int64 Title string Body sql.NullString CreatedAt SqliteDateTime UpdatedAt SqliteDateTime AuthorID int64 }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) ChangeAuthorEmail ¶
func (q *Queries) ChangeAuthorEmail(ctx context.Context, arg ChangeAuthorEmailParams) error
func (*Queries) ChangeCommentBody ¶
func (q *Queries) ChangeCommentBody(ctx context.Context, arg ChangeCommentBodyParams) error
func (*Queries) ChangeEntryBody ¶
func (q *Queries) ChangeEntryBody(ctx context.Context, arg ChangeEntryBodyParams) error
func (*Queries) ChangeEntryTitle ¶
func (q *Queries) ChangeEntryTitle(ctx context.Context, arg ChangeEntryTitleParams) error
func (*Queries) CreateAuthor ¶
func (*Queries) CreateComment ¶
func (*Queries) CreateEntry ¶
func (*Queries) DeleteComment ¶
func (*Queries) GetCommentsByEntry ¶
func (*Queries) GetEntryByAuthor ¶
type SqliteDateTime ¶
func (*SqliteDateTime) Scan ¶
func (ts *SqliteDateTime) Scan(src any) error
type UpdateTSParams ¶
type UpdateTSParams struct { UpdatedAt SqliteDateTime ID int64 }
Click to show internal directories.
Click to hide internal directories.