Documentation
¶
Index ¶
- type PostgresAdapter
- func (p *PostgresAdapter) Create(entity any) error
- func (p *PostgresAdapter) Delete(id string, entity any) error
- func (p *PostgresAdapter) FindAll(entity any, filters map[string]any, pagination db.Pagination, sort []db.Sort) (any, error)
- func (p *PostgresAdapter) FindByID(id string, entity any) (any, error)
- func (p *PostgresAdapter) Init() error
- func (p *PostgresAdapter) Migrate(entities []any) error
- func (p *PostgresAdapter) Update(entity any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgresAdapter ¶
type PostgresAdapter struct {
// contains filtered or unexported fields
}
func New ¶
func New(dsn string) *PostgresAdapter
func (*PostgresAdapter) Create ¶
func (p *PostgresAdapter) Create(entity any) error
func (*PostgresAdapter) FindAll ¶
func (p *PostgresAdapter) FindAll(entity any, filters map[string]any, pagination db.Pagination, sort []db.Sort) (any, error)
func (*PostgresAdapter) FindByID ¶
func (p *PostgresAdapter) FindByID(id string, entity any) (any, error)
func (*PostgresAdapter) Init ¶
func (p *PostgresAdapter) Init() error
func (*PostgresAdapter) Migrate ¶
func (p *PostgresAdapter) Migrate(entities []any) error
func (*PostgresAdapter) Update ¶
func (p *PostgresAdapter) Update(entity any) error
Click to show internal directories.
Click to hide internal directories.