Documentation
¶
Overview ¶
Package store is the single-source alias repository: one implementation against *sql.DB plus a kernel Dialect, replacing the three per-driver copies. Placeholder rendering, RETURNING support, and duplicate detection come from the dialect; everything else (columns, scans, messages, guards) ports the SQLite implementation verbatim.
Index ¶
- type Repository
- func (r *Repository) Create(ctx context.Context, a *alias.Alias) error
- func (r *Repository) DeleteByContentID(ctx context.Context, contentID int) error
- func (r *Repository) FindAll(ctx context.Context) ([]*alias.Alias, error)
- func (r *Repository) FindByAlias(ctx context.Context, aliasStr string) (*alias.Alias, error)
- func (r *Repository) FindByContentID(ctx context.Context, contentID int) ([]*alias.Alias, error)
- func (r *Repository) Repoint(ctx context.Context, aliasStr string, fromContentID, toContentID int) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository implements alias.Repository for every driver.
func New ¶
func New(db *sql.DB, dialect kerneldatabase.Dialect) *Repository
New creates a repository on db speaking dialect. Dialect must be non-nil; the composition root resolves it from the driver registry.
func (*Repository) DeleteByContentID ¶
func (r *Repository) DeleteByContentID(ctx context.Context, contentID int) error