Skip to content

feat: Allow access to pgx pool - BED-8082#2780

Merged
cweidenkeller merged 1 commit into
mainfrom
BED-8082
May 15, 2026
Merged

feat: Allow access to pgx pool - BED-8082#2780
cweidenkeller merged 1 commit into
mainfrom
BED-8082

Conversation

@cweidenkeller
Copy link
Copy Markdown
Contributor

@cweidenkeller cweidenkeller commented May 14, 2026

Description

Add access to pgx pool to allow for easier registration of composite types

Motivation and Context

Helps resolve BED-8082

Why is this change required? What problem does it solve?

We don't have access to the pgx pool directly we need access for registering OIDs

How Has This Been Tested?

This is just an accessor.

Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.

Screenshots (optional):

Types of changes

  • Chore (a change that does not modify the application functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Database Migrations

Checklist:

Summary by CodeRabbit

  • New Features
    • Exposes direct access to the application's database connection pool, making it easier for trusted tooling or integrations to perform lower-level database operations and diagnostics.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Pro

Run ID: 1f8904f2-d2ba-447b-aed7-8d9dbb6118ae

📥 Commits

Reviewing files that changed from the base of the PR and between 0a8160b and 58ec95a.

📒 Files selected for processing (1)
  • cmd/api/src/database/db.go
🚧 Files skipped from review as they are similar to previous changes (1)
  • cmd/api/src/database/db.go

📝 Walkthrough

Walkthrough

Adds an exported Pool() method to BloodhoundDB that returns the internal *pgxpool.Pool instance, providing direct access to the PostgreSQL connection pool.

Changes

Database Pool Accessor

Layer / File(s) Summary
BloodhoundDB Pool() method
cmd/api/src/database/db.go
Added func (s *BloodhoundDB) Pool() *pgxpool.Pool which returns the internal pgx connection pool field. This is the only change in the file.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Description check ❓ Inconclusive The description addresses the main objective but lacks concrete details in critical sections. Testing section is empty, motivation is brief, and no specific type of change is selected. Expand 'How Has This Been Tested' with specific test details, testing environment, and confirm which type of change applies (likely 'New feature'). Clarify the motivation with more context about why pgx pool access is needed.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: exposing access to the pgx pool with a relevant ticket reference.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch BED-8082

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cweidenkeller cweidenkeller self-assigned this May 14, 2026
@cweidenkeller cweidenkeller added enhancement New feature or request go Pull requests that update go code labels May 14, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 15, 2026

Caution

Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted.

Error details
{}

@cweidenkeller cweidenkeller merged commit 7c2b832 into main May 15, 2026
14 checks passed
@cweidenkeller cweidenkeller deleted the BED-8082 branch May 15, 2026 16:31
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request go Pull requests that update go code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants