postgres

package
v0.0.0-...-943fa91 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentRepo

type CommentRepo struct {
	*dbrepo.Base
}

func NewCommentRepo

func NewCommentRepo(db *sql.DB) *CommentRepo

func (*CommentRepo) GetAuthorByID

func (r *CommentRepo) GetAuthorByID(ctx context.Context, id string) (*discussion.Author, error)

func (*CommentRepo) GetAuthorByUserID

func (r *CommentRepo) GetAuthorByUserID(ctx context.Context, userID string) (*discussion.Author, error)

func (*CommentRepo) GetCommentsAndRepliesRecursively

func (r *CommentRepo) GetCommentsAndRepliesRecursively(ctx context.Context, subjectID string) ([]*discussion.Comment, error)

func (*CommentRepo) SaveAuthor

func (r *CommentRepo) SaveAuthor(ctx context.Context, author *discussion.Author) error

func (*CommentRepo) SaveComment

func (r *CommentRepo) SaveComment(ctx context.Context, comment *discussion.Comment) error

Jump to

Keyboard shortcuts

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