Skip to content

feat: move __sqlrooms_* filtering from schemaTree to DuckDbSlice - #481

Merged
dmitriy-kostianetskiy merged 3 commits into
feat/filter-out-internal-assetsfrom
copilot/sub-pr-477
Mar 18, 2026
Merged

dmitriy-kostianetskiy merged 3 commits into
feat/filter-out-internal-assetsfrom
copilot/sub-pr-477

Conversation

Copilot AI commented Mar 18, 2026 •

Copy link
Copy Markdown
Contributor

Internal __sqlrooms_* resources were being filtered in createDbSchemaTrees (presentation layer). This moves the filtering upstream to DuckDbSlice, where it belongs — at data loading time.

Changes

  • DuckDbSlice: Added defaultLoadTableSchemasFilter (excludes databases/schemas prefixed with __sqlrooms_) and a loadTableSchemasFilter?: (table: QualifiedTableName) => boolean prop to CreateDuckDbSliceProps. Filter is applied in refreshTableSchemas after loadTableSchemas().
  • schemaTree.ts: Removed isInternalSqlRoomsResource and all filtering logic from createDbSchemaTrees.
  • Exports: defaultLoadTableSchemasFilter exported from @sqlrooms/duckdb.
  • Tests: Replaced schema-tree filtering tests with unit tests for defaultLoadTableSchemasFilter.

Usage

// Default: filters __sqlrooms_* automatically
createDuckDbSlice()

// Custom filter
createDuckDbSlice({ loadTableSchemasFilter: (table) => !table.schema?.startsWith('internal_') })

// Disable filtering entirely
createDuckDbSlice({ loadTableSchemasFilter: () => true })

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

- Remove isInternalSqlRoomsResource and filtering from createDbSchemaTrees
- Add defaultLoadTableSchemasFilter to DuckDbSlice that excludes __sqlrooms_* databases/schemas
- Add loadTableSchemasFilter prop to CreateDuckDbSliceProps (defaults to defaultLoadTableSchemasFilter)
- Apply filter in refreshTableSchemas after loadTableSchemas()
- Export defaultLoadTableSchemasFilter from package index
- Update tests: remove schema-tree filtering tests, add unit tests for defaultLoadTableSchemasFilter

Copilot AI commented Mar 18, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • extensions.duckdb.org
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node scripts/download-extensions.mjs (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] [437] Implement internal resource filtering in createDbSchemaTrees feat: move __sqlrooms_* filtering from schemaTree to DuckDbSlice Mar 18, 2026
@dmitriy-kostianetskiy
dmitriy-kostianetskiy marked this pull request as ready for review March 18, 2026 13:26
@dmitriy-kostianetskiy
dmitriy-kostianetskiy merged commit 1120d91 into feat/filter-out-internal-assets Mar 18, 2026
2 checks passed
@dmitriy-kostianetskiy
dmitriy-kostianetskiy deleted the copilot/sub-pr-477 branch March 18, 2026 13:26
dmitriy-kostianetskiy added a commit that referenced this pull request Mar 20, 2026
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: Dmitriy Kostianetskiy <[email protected]>
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