Releases
v1.3.0
Non-Astra backend support
New environment
parameter on DataAPIClient
and db.admin()
Accepts 'astra' | 'dse' | 'hcd' | 'cassandra' | 'other'
Defaults to 'astra'
All token parameters now take in string | TokenProvider | undefined
Two default token providers
UsernamePasswordTokenProvider
for DSE, HCD
StaticTokenProvider
for symmetry (unit implementation)
New TokenProvider
subclasses may be created, additionally providing "token refreshing logic" as necessary
Tokens are now "optional" (i.e. you won't see a "missing token error" until the server throws one on an API request)
New DataAPIDbAdmin
for namespace CRUD on non-Astra instances
New example in examples/
for running on non-astra
Cursor sort vectors
New includeSortVector
parameter on cursor
False by default
If set to true, fetches the $vector
used in the cursor's vector sort (if applicable)
New await cursor.getSortVector()
to get the sort vector if the above is set
Deprecations
vector
/vectorize
keyword parameters deprecated on document operations
Use raw $vector[ize]
in documents for inserts
Use sort: { $vector[ize]: ... }
for sorts
deleteAll()
deprecated in favor of deleteMany({})
deleteMany({})
actually works now
Misc improvements
Package size made 33% smaller
collection.distinct()
made much faster when "distincting" on objects
Some documentation fixes/tweaks (especially around vectorize)
Few improved error messages
v1.2.1...v1.3.0
You can’t perform that action at this time.