Open
Conversation
I see no such description (or any comment) in the linked issue |
Contributor
Author
|
Linked wrong issue, should have been #261 |
f23a235 to
6f94563
Compare
There was a problem hiding this comment.
Pull request overview
This PR begins replacing the existing metadata API by introducing new/updated metadata model types for tables, materialized views, and keyspaces, along with corresponding TypeScript definitions.
Changes:
- Reworks table metadata modeling (adds
ColumnKind/ColumnMetadata, changesTableMetadatashape and exports). - Updates materialized view metadata to inherit from the new table metadata model.
- Introduces keyspace replication strategy/keyspace metadata model and updates TS typings; removes the old
DataCollectionabstraction.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/metadata/table-metadata.js | Replaces the old table metadata class with new column/table modeling and changes module exports. |
| lib/metadata/materialized-view.js | Switches materialized view to extend the new TableMetadata. |
| lib/metadata/keyspace-metadata.js | Adds new keyspace metadata + replication strategy model. |
| lib/metadata/index.d.ts | Adds TS types for the new metadata model (columns, table, keyspace strategy). |
| lib/metadata/data-collection.js | Removes legacy DataCollection base class. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6f94563 to
d1ea17b
Compare
wprzytula
requested changes
Mar 30, 2026
This was referenced Mar 30, 2026
Open
This API is a 1:1 mapping of the Table metadata exported by the rust driver.
The goal of those classes without constructors is to provide type definition,
visible and understandable for users. Metadata objects can be initialized
with object construction syntax (ex. {partitionKey: ['id']})
and returned from type annotated functions, without any penalty for lack
of constructors.
This API is a 1:1 mapping of the Materialized View metadata exported by the rust driver.
The goal of those classes without constructors is to provide type definition,
visible and understandable for users. Metadata objects can be initialized
with object construction syntax (ex. {partitionKey: ['id']})
and returned from type annotated functions, without any penalty for lack
of constructors.
This API is a 1:1 mapping of the Keyspace metadata exported by the rust driver.
This includes a Strategy class used in the keyspace metadata.
The goal of those classes without constructors is to provide type definition,
visible and understandable for users. Metadata objects can be initialized
with object construction syntax (ex. {partitionKey: ['id']})
and returned from type annotated functions, without any penalty for lack
of constructors.
This was used as a Base class for Materialized View and Tables metadata that is no longer used.
d1ea17b to
605ee5e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After some discussion with @wprzytula, we have decided that the existing API for the metadata is not worth keeping.
The problems with the DSx API are described in #261.
This PR is first part of replacing existing metadata API.
With this PR I introduce new / updated classes for tables, keyspace and materialized views. Those classes replace (non*) existing versions from the DSx driver.
* for keyspace class
Refs: #261, #70