Skip to content

Commit

Permalink
add arangodb integration
Browse files Browse the repository at this point in the history
  • Loading branch information
SOVLOOKUP committed Jan 28, 2021
1 parent 0e7e592 commit 2f167d8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/server/src/integrations/arangodb.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ class ArangoDBIntegration {
async read(query) {
try {
const result = await this.client.query(query.sql)
let rl = []
await result.forEach(r => rl.push(r))
return rl
return result.forEach(r => rl.push(r))
} catch (err) {
console.error("Error querying arangodb", err.message)
throw err
Expand All @@ -69,9 +67,7 @@ class ArangoDBIntegration {
const result = await this.client.query(
aql`INSERT ${query.json} INTO ${clc} LET n = NEW RETURN NEW`
)
let rl = []
await result.forEach(r => rl.push(r))
return rl
return result.forEach(r => rl.push(r))
} catch (err) {
console.error("Error querying arangodb", err.message)
throw err
Expand Down

0 comments on commit 2f167d8

Please sign in to comment.