add arangodb integration
This commit is contained in:
parent
13aab3b809
commit
0e7e5920c6
|
@ -53,7 +53,7 @@ class ArangoDBIntegration {
|
|||
try {
|
||||
const result = await this.client.query(query.sql)
|
||||
let rl = []
|
||||
await result.forEach((r)=> rl.push(r))
|
||||
await result.forEach(r => rl.push(r))
|
||||
return rl
|
||||
} catch (err) {
|
||||
console.error("Error querying arangodb", err.message)
|
||||
|
@ -66,9 +66,11 @@ class ArangoDBIntegration {
|
|||
async create(query) {
|
||||
const clc = this.client.collection(this.config.collection)
|
||||
try {
|
||||
const result = await this.client.query(aql`INSERT ${query.json} INTO ${clc} LET n = NEW RETURN NEW`)
|
||||
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))
|
||||
await result.forEach(r => rl.push(r))
|
||||
return rl
|
||||
} catch (err) {
|
||||
console.error("Error querying arangodb", err.message)
|
||||
|
|
Loading…
Reference in New Issue