-
Notifications
You must be signed in to change notification settings - Fork 3
Metadata new api #407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Metadata new api #407
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
| @@ -0,0 +1,121 @@ | ||||
| "use strict"; | ||||
|
|
||||
| const { _TableMetadata } = require("./table-metadata"); | ||||
|
|
||||
| /** | ||||
| * Identifies the replication strategy variant. | ||||
| * @readonly | ||||
| * @enum {number} | ||||
| * @alias module:metadata~StrategyKind | ||||
| */ | ||||
| const StrategyKind = { | ||||
| /** | ||||
| * Deprecated in ScyllaDB. | ||||
| * | ||||
| * **Use only for a single datacenter and one rack.** | ||||
| * | ||||
| * Places the first replica on a node determined by the partitioner. | ||||
| * Additional replicas are placed on the next nodes clockwise in the ring | ||||
| * without considering topology (rack or datacenter location). | ||||
| */ | ||||
| SimpleStrategy: 0, | ||||
| /** | ||||
| * Use this strategy when you have (or plan to have) your cluster deployed across | ||||
| * multiple datacenters. This strategy specifies how many replicas you want in each | ||||
| * datacenter. | ||||
| * | ||||
| * `NetworkTopologyStrategy` places replicas in the same datacenter by walking the ring | ||||
| * clockwise until reaching the first node in another rack. It attempts to place replicas | ||||
| * on distinct racks because nodes in the same rack (or similar physical grouping) often | ||||
| * fail at the same time due to power, cooling, or network issues. | ||||
| */ | ||||
| NetworkTopologyStrategy: 1, | ||||
| /** | ||||
| * Used for internal purposes, e.g. for system tables. | ||||
| */ | ||||
| LocalStrategy: 2, | ||||
| /** | ||||
| * Unknown other strategy, which is not supported by the driver. | ||||
| */ | ||||
| Other: 3, | ||||
| }; | ||||
|
|
||||
| StrategyKind.S; | ||||
|
|
||||
|
Comment on lines
+43
to
+44
|
||||
| StrategyKind.S; |
Copilot
AI
Mar 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc type for tables references _TableMetadata, but that symbol doesn’t exist/export (and the new TS types model tables as TableMetadata). This will produce broken docs and incorrect editor hints; update it to reference TableMetadata (and similarly consider tightening views/userDefinedTypes away from Object to match the public types).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This imports
_TableMetadatafrom./table-metadata, buttable-metadata.jsexports{ TableMetadata, ColumnMetadata, ColumnKind }(no_TableMetadata). The destructured value will beundefined, which is confusing and makes the JSDoc below incorrect. ImportTableMetadata(or remove the import entirely and reference the exported alias directly in JSDoc).