Is attached#1194
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
🦋 Changeset detectedLatest commit: 301a340 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughThis PR extends ChangesDuckDatabaseManager Feature and Dependency Updates
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
packages/sqlduck/src/manager/database/duck-database-manager.test.ts (1)
89-104: ⚡ Quick winAdd a test for
includeInternal: truebranch.The new method includes branching logic on
includeInternal, but the new tests only validate the default path. Please add one case asserting internal DBs are included whenincludeInternal: true.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/sqlduck/src/manager/database/duck-database-manager.test.ts` around lines 89 - 104, Add a new test case that calls DuckDatabaseManager.getDatabases with includeInternal: true and asserts the returned list contains internal databases; specifically, create a DuckDatabaseManager(conn), call await dbManager.getDatabases({ includeInternal: true }), then assert at least one item has internal: true (or that the array contains expected internal DB entries) and its shape matches the existing expectation (fields like database_name, database_oid, encrypted, readonly, type: 'duckdb'); place this as an it(...) alongside the existing test to cover the includeInternal branch.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.changeset/sharp-parents-rescue.md:
- Line 5: The changeset note currently references the wrong API name; update the
text in .changeset/sharp-parents-rescue.md to use the actual public method name
getDatabases (exact casing) instead of getDuckdbDatabases so release notes
accurately reflect the added API; verify the rest of the note mentions the
correct symbol getDatabases and adjust any linked references or examples to
match.
---
Nitpick comments:
In `@packages/sqlduck/src/manager/database/duck-database-manager.test.ts`:
- Around line 89-104: Add a new test case that calls
DuckDatabaseManager.getDatabases with includeInternal: true and asserts the
returned list contains internal databases; specifically, create a
DuckDatabaseManager(conn), call await dbManager.getDatabases({ includeInternal:
true }), then assert at least one item has internal: true (or that the array
contains expected internal DB entries) and its shape matches the existing
expectation (fields like database_name, database_oid, encrypted, readonly, type:
'duckdb'); place this as an it(...) alongside the existing test to cover the
includeInternal branch.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 45a6b82b-b273-46ff-84ac-2c423edee022
⛔ Files ignored due to path filters (2)
.yarn/releases/yarn-4.15.0.cjsis excluded by!**/.yarn/**yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (22)
.changeset/deep-chefs-marry.md.changeset/sharp-parents-rescue.md.yarnrc.ymlbenchmark/package.jsondocs/package.jsonexamples/apps/fastify-app/package.jsonexamples/apps/nextjs-app/docker/Dockerfileexamples/apps/nextjs-app/docker/Dockerfile.alpineexamples/apps/nextjs-app/package.jsonexamples/shared/base-auth/package.jsonexamples/shared/base-ui/package.jsonexamples/shared/db-sqlserver/package.jsonexamples/shared/duckb-openfoodfact/package.jsonpackage.jsonpackages/core/package.jsonpackages/source-duckdb/package.jsonpackages/source-kysely/package.jsonpackages/sql-tag-format/package.jsonpackages/sql-tag/package.jsonpackages/sqlduck/package.jsonpackages/sqlduck/src/manager/database/duck-database-manager.test.tspackages/sqlduck/src/manager/database/duck-database-manager.ts
| "@flowblade/sqlduck": minor | ||
| --- | ||
|
|
||
| Add getDuckdbDatabases |
There was a problem hiding this comment.
Use the actual API name in the changeset note.
getDuckdbDatabases does not match the added public method (getDatabases), so release notes will be misleading.
Suggested fix
-Add getDuckdbDatabases
+Add getDatabases📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| Add getDuckdbDatabases | |
| Add getDatabases |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.changeset/sharp-parents-rescue.md at line 5, The changeset note currently
references the wrong API name; update the text in
.changeset/sharp-parents-rescue.md to use the actual public method name
getDatabases (exact casing) instead of getDuckdbDatabases so release notes
accurately reflect the added API; verify the rest of the note mentions the
correct symbol getDatabases and adjust any linked references or examples to
match.
@flowblade/core
@flowblade/source-duckdb
@flowblade/source-kysely
@flowblade/sql-tag
@flowblade/sql-tag-format
@flowblade/sqlduck
commit: |
Summary by CodeRabbit
Release Notes
New Features
isAttached()method to check if a database is currently attached.getDatabases()method to retrieve information about attached databases with filtering options.Chores