Skip to content

feat: optional driver-owned table query templates - #818

Draft
debba wants to merge 1 commit into
mainfrom
feat/optional-table-query-templates
Draft

debba wants to merge 1 commit into
mainfrom
feat/optional-table-query-templates

Conversation

@debba

@debba debba commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add optional capabilities.table_query_templates and get_table_query_template for SELECT/UPDATE/DELETE previews.
  • Delegate Generate SQL to the connection driver only when opted in; retain existing SQL generation for built-in drivers and older plugins.
  • Keep CREATE TABLE inspection and all existing RPC signatures unchanged.
  • Forward structured identifiers, schema, columns and the explicit SELECT limit to the plugin.
  • Guard the modal against stale responses and show real errors instead of silently generating a different SQL dialect.

Backward compatibility

  • Capability defaults to false and is omitted when serialized as false.
  • The DatabaseDriver trait has a default implementation; existing drivers need no RPC implementation.
  • Only a remote JSON-RPC -32601 selects the legacy fallback; transport errors, other error codes and malformed results propagate.
  • Old hosts ignore the new plugin capability; no plugin minimum runtime increase is required solely for this optional feature.

Validation

  • 105 frontend tests passed (SQL generation, optional templates, target modals and Command Palette).
  • 136 Rust plugin-area tests and 2 driver-trait tests passed.
  • TypeScript project build/typecheck and ESLint on changed source passed.
  • GitNexus staged change analysis: 16 files, medium risk; changes limited to opt-in templates and command registration.

Coordination

Refs TabularisDB/tabularis-sqlserver-plugin#26.
Plugin pagination fix: TabularisDB/tabularis-sqlserver-plugin#30.
The matching plugin implementation is on feat/table-query-templates; this draft freezes the additive contract for joint review.

Tabularium

Before publishing the plugin, register the optional boolean table_query_templates (default false) under the driver-kind capabilities schema. Ingestion uses lenient AJV validation with removeAdditional: all, which otherwise strips the flag. No database migration, endpoint or SDK change is needed. Registry production configuration has not been modified.

@debba

debba commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator Author

Matching SQL Server implementation: TabularisDB/tabularis-sqlserver-plugin#31 (stacked on the pagination fix in #30 of that repository). The new flag must be registered in the Tabularium driver-kind schema before publishing the plugin; registry code and production configuration remain untouched.

This branch has not been deployed

No deployments
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.

1 participant