store

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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) Create

func (r *Repository) Create(ctx context.Context, a *alias.Alias) error

func (*Repository) DeleteByContentID

func (r *Repository) DeleteByContentID(ctx context.Context, contentID int) error

func (*Repository) FindAll

func (r *Repository) FindAll(ctx context.Context) ([]*alias.Alias, error)

func (*Repository) FindByAlias

func (r *Repository) FindByAlias(ctx context.Context, aliasStr string) (*alias.Alias, error)

func (*Repository) FindByContentID

func (r *Repository) FindByContentID(ctx context.Context, contentID int) ([]*alias.Alias, error)

func (*Repository) Repoint

func (r *Repository) Repoint(ctx context.Context, aliasStr string, fromContentID, toContentID int) error

Jump to

Keyboard shortcuts

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