v8.4.0
Changed
-
Fetching additional cursor results now uses
POSTinstead ofPUT(DE-605)The
POSTroute was deprecated and thePUTroute 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_systemdatabase. -
aqltemplate strings now take a generic type argumentThis allows explictly setting the item type of the
ArrayCursorreturned by
db.querywhen usingaqltemplate strings. Note that like when setting
the type ondb.querydirectly, 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
listUsersbehavior (#782) -
Fixed
graph.createnot correctly handlingisDisjointoption
Added
-
Added missing attributes to
QueryInfoandMultiExplainResult.statstypes (DE-607) -
Added cluster rebalancing methods to
Database(DE-583) -
Added
db.withTransactionhelper 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 })); });