Documentation ¶
Overview ¶
Package homedb contains home related CRUD functionality.
Index ¶
- type Store
- func (s *Store) Count(ctx context.Context, filter home.QueryFilter) (int, error)
- func (s *Store) Create(ctx context.Context, hme home.Home) error
- func (s *Store) Delete(ctx context.Context, hme home.Home) error
- func (s *Store) ExecuteUnderTransaction(tx transaction.Transaction) (home.Storer, error)
- func (s *Store) Query(ctx context.Context, filter home.QueryFilter, orderBy order.By, pageNumber int, ...) ([]home.Home, error)
- func (s *Store) QueryByID(ctx context.Context, homeID uuid.UUID) (home.Home, error)
- func (s *Store) QueryByUserID(ctx context.Context, userID uuid.UUID) ([]home.Home, error)
- func (s *Store) Update(ctx context.Context, hme home.Home) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages the set of APIs for home database access.
func (*Store) ExecuteUnderTransaction ¶
func (s *Store) ExecuteUnderTransaction(tx transaction.Transaction) (home.Storer, error)
ExecuteUnderTransaction constructs a new Store value replacing the sqlx DB value with a sqlx DB value that is currently inside a transaction.
func (*Store) Query ¶
func (s *Store) Query(ctx context.Context, filter home.QueryFilter, orderBy order.By, pageNumber int, rowsPerPage int) ([]home.Home, error)
Query retrieves a list of existing homes from the database.
func (*Store) QueryByUserID ¶
QueryByUserID gets the specified home from the database by user id.
Click to show internal directories.
Click to hide internal directories.