Skip to content

feat: expose connector name#205

Open
beeequeue wants to merge 1 commit into
unjs:mainfrom
beeequeue:connector
Open

feat: expose connector name#205
beeequeue wants to merge 1 commit into
unjs:mainfrom
beeequeue:connector

Conversation

@beeequeue

@beeequeue beeequeue commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

this pr exposes the name of the connector via the db instance, this is useful for libraries integrating with db0 that otherwise have to do workarounds to know what connectors are being used

Summary by CodeRabbit

  • New Features
    • Added a read-only connector name property to database instances.
    • Database consumers can now identify which connector is being used.

@pi0 pi0 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 71a16d65-7b14-4964-8545-c3a690871998

📥 Commits

Reviewing files that changed from the base of the PR and between d2a0e70 and 031426c.

📒 Files selected for processing (2)
  • src/database.ts
  • src/types.ts

📝 Walkthrough

Walkthrough

Database now exposes the connector name through a typed readonly property, backed by a getter on the object returned from createDatabase.

Changes

Database Connector Name

Layer / File(s) Summary
Typed connector property
src/types.ts, src/database.ts
Database declares readonly connector: ConnectorName, and createDatabase returns the connector name through a getter.

Estimated code review effort: 1 (Trivial) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely reflects the main change: exposing the connector name on the db instance.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


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.

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.

2 participants