Skip to content

Feat/sql api database meta#10935

Open
SaschaJohn wants to merge 3 commits into
cube-js:masterfrom
SaschaJohn:feat/sql-api-database-meta
Open

Feat/sql api database meta#10935
SaschaJohn wants to merge 3 commits into
cube-js:masterfrom
SaschaJohn:feat/sql-api-database-meta

Conversation

@SaschaJohn
Copy link
Copy Markdown

Check List

  • Tests have been run in packages where changes have been made if available
  • Linter has been run for changed code
  • Tests for the changes have been added if not covered yet
  • [-] Docs have been added / updated if required

Issue Reference this PR resolves

#10934

Description of Changes Made (if issue reference is not provided)

expose the existing dbname from session to metadata

SaschaJohn and others added 3 commits May 22, 2026 09:44
…equestMeta

The PostgreSQL wire protocol startup message includes a `database`
parameter, which is already parsed and stored on SessionState. However,
it was never included in LoadRequestMeta, making it inaccessible to
JS configuration callbacks like extendContext.

This is needed for multi-tenant setups where the database name carries
the tenant identifier (e.g. a UUID), allowing checkSqlAuth or
extendContext to resolve tenant context from the client-supplied dbname.

Changes:
- Add `database: Option<String>` field to LoadRequestMeta (Rust)
- Populate it from SessionState::database() in get_load_request_meta
- Add `database?: string` to BaseMeta TypeScript interface

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@SaschaJohn SaschaJohn requested review from a team as code owners May 22, 2026 09:55
@github-actions github-actions Bot added rust Pull requests that update Rust code javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members. labels May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code pr:community Contribution from Cube.js community members. rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant