v8.4.0
Changed
-
Fetching additional cursor results now uses
POST
instead ofPUT
(DE-605)The
POST
route was deprecated and thePUT
route is supported in all
actively maintained versions of ArangoDB. -
User management methods now use database-relative URLs (DE-606)
Previously these methods would make requests without a database prefix,
implicitly using the_system
database. -
aql
template strings now take a generic type argumentThis allows explictly setting the item type of the
ArrayCursor
returned by
db.query
when usingaql
template strings. Note that like when setting
the type ondb.query
directly, arangojs can make no guarantees that the
type matches the actual data returned by the query.const numbers = await db.query(aql<{ index: number; squared: number }>` FOR i IN 1..1000 RETURN { index: i, squared: i * i } `); const first = await numbers.next(); // { index: number; squared: number; } console.log(first.index, first.squared); // 1 1
Fixed
-
Fixed
listUsers
behavior (#782) -
Fixed
graph.create
not correctly handlingisDisjoint
option
Added
-
Added missing attributes to
QueryInfo
andMultiExplainResult.stats
types (DE-607) -
Added cluster rebalancing methods to
Database
(DE-583) -
Added
db.withTransaction
helper method for streaming transactions (#786)This method allows using streaming transactions without having to manually
begin and commit or abort the transaction.const vertices = db.collection("vertices"); const edges = db.collection("edges"); const info = await db.withTransaction([vertices, edges], async (step) => { const start = await step(() => vertices.document("a")); const end = await step(() => vertices.document("b")); return await step(() => edges.save({ _from: start._id, _to: end._id })); });