Socket
Socket
Sign inDemoInstall

arangolize

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

arangolize - npm Package Compare versions

Comparing version 0.9.8 to 0.10.1

21

dist/index.js

@@ -26,5 +26,3 @@ "use strict";

};
this._query = `let data = (
for instance in @@modelName
filter instance._removed != true`;
this._query = ``;
}

@@ -135,2 +133,3 @@

return _asyncToGenerator(function* () {
const args = _this.props;
let {

@@ -140,4 +139,5 @@ where,

sort,
include
} = _this.props;
include,
$with
} = args;
const {

@@ -148,2 +148,13 @@ query,

if ($with) {
bindVars({
with: $with
});
query(`WITH @@with\n`);
}
query(`let data = (
for instance in @@modelName
filter instance._removed != true`);
if (include && !Array.isArray(include)) {

@@ -150,0 +161,0 @@ bindVars({

@@ -11,5 +11,3 @@ import { autobind } from 'core-decorators'

}
this._query = `let data = (
for instance in @@modelName
filter instance._removed != true`
this._query = ``
}

@@ -103,5 +101,15 @@

async build () {
let { where, attributes, sort, include} = this.props
const args = this.props
let { where, attributes, sort, include, $with } = args
const { query, bindVars } = this
if ($with) {
bindVars({ with: $with })
query(`WITH @@with\n`)
}
query(`let data = (
for instance in @@modelName
filter instance._removed != true`)
if (include && !Array.isArray(include)) {

@@ -108,0 +116,0 @@ bindVars({ includeAs: include.as })

@@ -64,1 +64,20 @@ import test from 'tape'

})
test('query with $with', async (t) => {
const { bindVars, query } = await arangolize({
$with: 'User',
limit: 5,
skip: 0,
sort: 'createdAt DESC',
attributes: ['creator', 'createdAt'],
include: {
as: 'creator',
where: { name: 'noah' },
attributes: ['createdAt', 'name']
}
})
t.ok(query, 'should have query')
t.ok(bindVars, 'should have bindVars')
t.end()
})
{
"name": "arangolize",
"version": "0.9.8",
"version": "0.10.1",
"description": "Sequelize-like query-builder for ArangoDB",

@@ -26,3 +26,4 @@ "main": "dist/index.js",

"core-decorators": "^0.20.0"
}
},
"gitHead": "99e4e04767bef8812c4dcb85dcbca0dc8c84a810"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc