Skip to content

Releases: datastax/astra-db-ts

v2.0.2

21 Jul 17:15
Compare
Choose a tag to compare

Minor changes before 2.1.0

  • Expose cursor page state
  • Migrate WithTimeout to more general CommandOptions
  • findAvailableRegions implementation
  • Fix bug making lexical options ignored in createCollection

Note

See the https://github.com/datastax/astra-db-ts/releases/tag/v2.0.0 for the full release notes for the new 2.0.0 major version

v2.0.1

16 Apr 14:29
Compare
Choose a tag to compare

Minor bug patch release

Minor patch to fix findAnd* commands not property deserializating the returned document

Note

See the https://github.com/datastax/astra-db-ts/releases/tag/v2.0.0 for the full release notes for the new 2.0.0 major version

v2.0.0

14 Apr 21:06
Compare
Choose a tag to compare

v2.0.0 - Major client overhaul

Warning

Release notes are still under construction

Table of contents

Note

Asterisks (*) by section names indicate those that include note of any breaking changes from v1.x to v2.x.

What's new?

Prerequisites*

  • Node.js v18 or higher
  • TypeScript v5.0 or higher

Data API tables support

Adds complete support for Data API tables via the Table class.

Dual types*

Classes/types such as UpdateOneOptions, FindCursor, InsertManyError, etc. have been split into two different variants of each:

  • CollectionUpdateOneOptions and TableUpdateOneOptions,
  • CollectionFindand CursorTableFindCursor,
  • CollectionInsertManyError and TableInsertManyError,
  • etc.

Collection methods on the Db class (such as db.collection(), db.createCollection(), db.listCollections(), etc.) now have sister methods for tables:

  • db.table(),
  • db.createTable(),
  • db.listTables(),
  • etc.

Indexes

Furthermore, tables necessitate indexes, which may be created through table.createIndex() (and its sister methods), and dropped through db.dropTableIndex().

Utility types

New utility types to infer the table's TS-type from its schema has been added as well:

  • InferTableSchema
  • InferTablePrimaryKey

Datatypes

Lastly, of the major additions, new datatypes have been added as well to support the new tables:

  • DataAPIBlob
  • DataAPIDate
  • DataAPITime
  • DataAPIDuration
  • DataAPIInet
  • DataAPIVector
  • BigNumber (re-exported from bignumber.js)

See DATATYPES.md for more information on the new datatypes.

findAndRerank support

Note

This is tied to the Overhaul of cursors section; please read that section as well for more information.

Preview hybrid search support has dropped via the collection.findAndRerank() method, which uses a new FindAndRerankCursor to iterate over its results.

New LexicalDoc type added as well as a sister type to VectorDoc and VectorizeDoc.

Overhaul of the logging system*

The logging system has evolved beyond a simple, immutable monitorCommands flag which would emit events only on the DataAPIClient class.

Now, logging is configured through the logging option anywhere along the options hierarchy, and adds a variety of new features:

  • Events may log to the console as well now, as opposed to just being emitted as an event
  • All classes in the client hierarchy are now event listeners
    • These all extend the HierarchicalLogger class, which implements a minimal event emitter
    • Events are bubbled up from the class they were emitted from, all the way up to the root DataAPIClient
    • Event bubbling may be cancelled through event.stop[Immediate]Propagation() like the DOM

Logging may also be enabled/disabled/reconfigured on the fly, via the .updateLoggingConfig(<config>) method on any HierarchicalLogger instance (e.g. DataAPIClient, Db, Collection, etc.).

See the logging examples for more information.

Overhaul of the timeout system*

The timeout system has been overhauled to be more flexible and descriptive than the current singular maxTimeMS.

Timeouts are now configured through the timeoutDefaults parameter on class options interfaces, and the timeout parameter on method calls.

They are represented by the TimeoutDescriptor class, which contains the six following keys:

Timeout Option Description Default
requestTimeoutMs Maximum time the client waits for a response from the server 15 seconds
generalMethodTimeoutMs Timeout for general methods without a specific override (mostly doc/row-level ops) 30 seconds
collectionAdminTimeoutMs Timeout for collection admin operations (create, drop, list, etc.) 1 minute
tableAdminTimeoutMs Timeout for table admin operations (create, drop, list, alter, create/dropIndex, etc.) 30 seconds
databaseAdminTimeoutMs Timeout for database admin operations (create, drop, list, info, findEmbeddingProviders, etc.) 10 minutes
keyspaceAdminTimeoutMs Timeout for keyspace admin operations (create, drop, list) 30 seconds

In general, the requestTimeoutMs always corresponds to a single request from the server, but the rest of the timeouts account for the entire duration of the method, which is relevant in the case of multi-call methods.

A few important notes:

  • requestTimeoutMs applies per individual HTTP request.
  • The other timeouts account for the entire duration of the method, which is relevant in the case of multi-call methods.
  • Passing a timeout value as a plain number will use the most appropriate category for the method being called.
  • Setting a timeout to 0 disables it completely.
  • The legacy maxTimeMS option has been removed—simply replace it with timeout for a quick migration path.

Overhaul of cursors*

Cursors are no longer a single FindCursor class, but are now a [hierarchy of classes](https://mermaid.live/edit#pako:eNqtWA1z2kYa_itvdW0CCeYce-zUnOOMz3GmvknijKHt3JVOtUgLbCN2NasVNpeY337P7kpCCHDcazMTQLvv1_N-y5-DSMU86AVRwrLsjWATzWZDOZTffUevtv5zVx-uB5d0_YFCMxVZ2HNn7uPfKqcZW1DGOc24mao4o0R84mQJSUh8c4pynSlNTiXPPPcZHpXkrbajfLaSOACDV0Oam1xDxCLllImJFGPBM9Az48R6fTTLM1ORTrkTkrEZ9_o8N8u8If6kIQCGjriQE4pYkvCYlOyuzHkLw_kdm6UJ71A4YKOEvxUyvnCQugWG0BuRGZEkpSnMsTc5wg7xObeGqnwypXAlAVbEfCykM8CZF56PMqNZZArWmlUDgOpHWqSGEm4yWiAMecY926bzjCIurSE-LCM-ZXMB81cCr8GpKWFykrMJzzo-iP9ic9ahW4sKHF7OXZqISJhkQWrOtRax1-rVOVne48YC1QvYN-dJB9Y5D6s504JL-Cofgc6eQahkWqvbmhwnY3sUaskXhuHvsND9ZoWvihivu-50cEafHRlRmo8AYEW_STljaavb7bb_4TjuV_oaOlZRfUj-OtVO2V5kI1ssB78zXMZf0dbg26GUPhO-6L6uHD58sPh9-StTFkcjKfuGmRzZNuIRKxMwc2ckTMaTMfLaiXC5ECkZcUQY6SFjhJoliLFHXhdn0QEbnZ5eynzGNTNCybMzf3j15t2l_9UfnN8MLt_4h4t31337-74w-YanmmfItIxYlddPrVVWHlwkJH6NWcT_LmxazUDq9FT55pPfFcytypMYGB28KyvB1lIloVvxDPrbOH7pL2YjlXRZtpDRVWHAr5RqlXJtFpUPyqsV_gvrsNRY7FuAWdl1aLFQM2CI6BYdGWWlS1K4m1Rq0bGkUvsg0PC6IEf-hA_ACwf0hWSeJCGVKN6zBS52QthWn8tBhwY37HZZcZX3ls2f-dGAFIsABhhGiMECEGdM2GcxZ6bs8xhHU2ugfGqsjcjL2I4itJxiBHmJe_QbEjJDhsXUs9Gsjkf5eIx22HNG_fJrzYT-tES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17LlvNvDRNf_Rzk33PHH6rrJXCvwncW6w_9_fdVWiv5U-W6T8nAdPx7gnynoXXF7dGXvil0BqnpfO_2yt9dYGIbSvwed4oW7ebP2rvtsC-tQrp94BSvvDust3d1t66WbVI2W9ZCiBvShrHUQi2krzbbQbjHv8Xy7IjGUQSfAUoPmGge9wKXPMECXnPFhgG...

Read more

v2.0.0-rc.1

09 Apr 20:07
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

v2.0.0-preview.5

06 Feb 17:56
Compare
Choose a tag to compare
v2.0.0-preview.5 Pre-release
Pre-release

v2.0.0-preview.4

05 Feb 15:46
Compare
Choose a tag to compare
v2.0.0-preview.4 Pre-release
Pre-release
  • ESM support & various other compat improvements (#100) caf28e7
  • Docs work + update internal parsing & tooling (#99) 30fb76f

v2.0.0-preview.3...v2.0.0-preview.4

v2.0.0-preview.3

28 Jan 16:48
Compare
Choose a tag to compare
v2.0.0-preview.3 Pre-release
Pre-release

v2.0.0-preview.2

23 Jan 02:08
Compare
Choose a tag to compare
v2.0.0-preview.2 Pre-release
Pre-release
  • fix for process.env in the browser 7517a12

v2.0.0-preview.1...v2.0.0-preview.2

v2.0.0-preview.1

21 Jan 16:26
Compare
Choose a tag to compare
v2.0.0-preview.1 Pre-release
Pre-release
  • remoaved feature-flag tables header 23245c2
  • begrudgingly added InetAddress back as DataAPIInet 6aa0594
  • DataAPIDuration massive overhaul 4ea6a97
  • work for repl scirpt 98a9e66
  • overhaul of times 9d087f2
  • overhaul of dates ce54e01
  • enhanced coll bignumbers support cbcc101
  • reexport from version file 4b86423
  • check for broken compilation when skipLibCheck: false w/ astra-db-ts as dep a8dfc4f
  • bigints & counters now use bigint 29e5805
  • killed DataAPITimestamp 344b10a
  • proper checking for Bignumbers eea4db0
  • separate scripts/check.sh file for typechecking/linting 3fc4f33
  • UnexpectedDataAPIResponseError e1c342f
  • ser-des work (#92) 60e616f
  • Expand UUID versions (#91) 04af5e3

v2.0.0-preview.0...v2.0.0-preview.1

v2.0.0-preview.0

11 Dec 14:42
Compare
Choose a tag to compare
v2.0.0-preview.0 Pre-release
Pre-release

NOTE
The release notes are still under construction
The current commit list is just temporary

v1.5.0...v2.0.0-preview.0

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy