Releases: datastax/astra-db-ts
v2.1.2
2.1.2
- Fixed bugs pertaining to
initialPageStateandfetchNextPagein cursors
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.1.1
2.1.1
- Added
table.listIndexes()
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.1.0
2.1.0
- Added UDT support
- Comprehensive DML + DDL functions for UDTs
- Add embedding/reranking model status support
- Added proper typings for reranking providers
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.2
Minor changes before 2.1.0
- Expose cursor page state
- Migrate
WithTimeoutto more generalCommandOptions - 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
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
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*
- Data API tables support
findAndReranksupport- Overhaul of the logging system*
- Overhaul of the timeout system*
- Overhaul of cursors*
- Overhauls of certain admin functionality*
- Increased client compatibility across all environments*
- New fully-customizable ser/des system
- Errors improvements*
- Various minor changes and improvements
- Migration tips
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:
CollectionUpdateOneOptionsandTableUpdateOneOptions,CollectionFindandCursorTableFindCursor,CollectionInsertManyErrorandTableInsertManyError,- 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:
InferTableSchemaInferTablePrimaryKey
Datatypes
Lastly, of the major additions, new datatypes have been added as well to support the new tables:
DataAPIBlobDataAPIDateDataAPITimeDataAPIDurationDataAPIInetDataAPIVectorBigNumber(re-exported frombignumber.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
HierarchicalLoggerclass, 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
- These all extend the
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:
requestTimeoutMsapplies 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
timeoutvalue as a plain number will use the most appropriate category for the method being called. - Setting a
timeoutto 0 disables it completely. - The legacy maxTimeMS option has been removed—simply replace it with
timeoutfor a quick migration path.