Skip to content

Use shared database package from git-pkgs#18

Open
andrew wants to merge 1 commit intomainfrom
use-database-package
Open

Use shared database package from git-pkgs#18
andrew wants to merge 1 commit intomainfrom
use-database-package

Conversation

@andrew
Copy link
Contributor

@andrew andrew commented Mar 4, 2026

Imports Package and Version types from github.com/git-pkgs/git-pkgs/database instead of defining them locally, and delegates SQLite connection setup to the shared Open function.

This replaces ~70 lines of duplicated type definitions and connection boilerplate with imports from the shared package introduced in git-pkgs/git-pkgs#157.

The proxy's queries, PostgreSQL support, and proxy-specific types (Artifact, Vulnerability) are unchanged.

Depends on git-pkgs/git-pkgs#157.

Closes #16.

Import Package and Version types from the git-pkgs database package
instead of defining them locally. Both projects now share the same
type definitions, keeping the packages and versions tables in sync.

Delegate SQLite connection setup to the shared Open function so
pragma settings (WAL, busy timeout, connection limit) stay aligned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Share database infrastructure with git-pkgs

1 participant