mirror of https://gitee.com/bigwinds/arangodb
60 lines
22 KiB
JSON
60 lines
22 KiB
JSON
{
|
|
"name": "aqb",
|
|
"version": "2.1.0",
|
|
"description": "ArangoDB AQL query builder.",
|
|
"main": "index.js",
|
|
"keywords": [
|
|
"arangodb",
|
|
"aql",
|
|
"nosql",
|
|
"query"
|
|
],
|
|
"files": [
|
|
"*.js",
|
|
"package.json",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"test": "npm run lint && npm run test-only",
|
|
"test-only": "mocha -t 30000 --growl -R spec test test/**",
|
|
"cover": "npm run lint && istanbul cover --report lcov _mocha -- -t 30000 -R spec",
|
|
"coveralls": "npm run cover && cat ./coverage/lcov.info | coveralls ; rm -rf ./coverage",
|
|
"dist": "npm run bundle && npm run minify",
|
|
"bundle": "browserify -t dekeywordify -u console -s aqb ./index.js > dist/aqb.js",
|
|
"minify": "uglifyjs dist/aqb.js > dist/aqb.min.js",
|
|
"lint": "eslint index.js *.js test",
|
|
"prepublish": "npm run lint"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git://github.com/arangodb/aqbjs.git"
|
|
},
|
|
"author": {
|
|
"name": "Alan Plum",
|
|
"email": "me@pluma.io"
|
|
},
|
|
"license": "APACHE-2.0",
|
|
"bugs": {
|
|
"url": "https://github.com/arangodb/aqbjs/issues"
|
|
},
|
|
"homepage": "https://github.com/arangodb/aqbjs",
|
|
"devDependencies": {
|
|
"browserify": "^7.0.2",
|
|
"coveralls": "^2.11.2",
|
|
"dekeywordify": "^0.2.1",
|
|
"eslint": "^1.3.1",
|
|
"expect.js": "^0.3.1",
|
|
"istanbul": "^0.3.5",
|
|
"mocha": "^2.1.0",
|
|
"uglify-js": "^2.4.15"
|
|
},
|
|
"dependencies": {},
|
|
"readme": "# ArangoDB Query Builder\n\nThe query builder allows constructing complex AQL queries with a pure JavaScript fluid API.\n\n[](http://opensource.org/licenses/APACHE-2.0) [](https://david-dm.org/arangodb/aqbjs)\n\n[](https://npmjs.org/package/aqb)\n\n[](https://travis-ci.org/arangodb/aqbjs) [](https://coveralls.io/r/arangodb/aqbjs?branch=master) [](https://www.codacy.com/public/me_4/aqbjs)\n\n# Install\n\n## With NPM\n\n```sh\nnpm install aqb\n```\n\n## With Bower\n\n```sh\nbower install aqb\n```\n\n## ArangoDB\n\nAs of ArangoDB 1.3, a version of `aqb` comes pre-installed with ArangoDB.\n\n```js\nvar qb = require('aqb');\n```\n\nIf you want to use a more recent version of `aqb` in a Foxx app, you can add it to your NPM dependencies as usual.\n\n## Browser\n\nThis CommonJS module is compatible with [browserify](http://browserify.org).\n\nIf you don't want to use browserify, you can simply use the AMD-compatible [browserify bundle](https://raw.githubusercontent.com/arangodb/aqbjs/master/dist/aqb.min.js) (~30 kB minified, ~6 kB gzipped).\n\nIf you want to use this module in non-ES5 browsers like Microsoft Internet Explorer 8 and earlier, you may need to include [es5-shim](https://www.npmjs.com/package/es5-shim) or a similar ES5 polyfill.\n\n## From source\n\n```sh\ngit clone https://github.com/arangodb/aqbjs.git\ncd aqbjs\nnpm install\nnpm run dist\n```\n\n# Example\n\n```js\n// in arangosh\nvar db = require('org/arangodb').db;\nvar qb = require('aqb');\nconsole.log(db._query(qb.for('x').in('1..5').return('x')).toArray()); // [1, 2, 3, 4, 5]\n```\n\n# API\n\n## Auto-casting raw data\n\nBy default, the query builder will attempt to interpret raw strings as identifiers or references or other kinds of expressions. This may not always be what you want, especially when handling raw untrusted data.\n\nAs of version 1.8 you can now pass arbitrary data directly to the query builder itself and it will be translated to the equivalent AQL structure (e.g. strings will be strings, dates will be converted to JSON, arrays and objects will be translated recursively, and so on):\n\n```js\nvar doc = {\n aString: \"hello\",\n aDate: new Date(),\n aNumber: 23,\n anArray: [1, 2, 3, \"potato\"]\n};\ndb._query(qb.insert(qb(doc)).into('my_collection'));\n```\n\n## AQL Types\n\nIf raw JavaScript values are passed to AQL statements, they will be wrapped in a matching AQL type automatically.\n\nJavaScript strings wrapped in quotation marks will be wrapped in AQL strings, all other JavaScript strings will be wrapped as simple references (see below) and throw an *AQLError* if they are not well-formed.\n\n### Boolean\n\nWraps the given value as an AQL Boolean literal.\n\n`qb.bool(value)`\n\nIf the value is truthy, it will be converted to the AQL Boolean *true*, otherwise it will be converted to the AQL Boolean *false*.\n\nIf the value is already an AQL Boolean, its own value will be wrapped instead.\n\n### Number\n\nWraps the given value as an AQL Number literal.\n\n`qb.num(value)`\n\nIf the value is not a JavaScript Number, it will be converted first.\n\nIf the value does not represent a finite number, an *AQLError* will be thrown.\n\nIf the value is already an AQL Number or AQL Integer, its own value will be wrapped instead.\n\n### Integer\n\nWraps the given value as an AQL Integer literal.\n\n`qb.int(value)`\n\nIf the value is not a JavaScript Number, it will be converted first.\n\nIf the value does not represent a finite integer, an *AQLError* will be thrown.\n\nIf the value is already an AQL Number or AQL Integer, its own value will be wrapped instead.\n\n\n### String\n\nWraps the given value as an AQL String literal.\n\n`qb.str(value)`\n\nIf the value is not a JavaScript String, it will be converted first.\n\nIf the value is a quoted string, it will be treated as a string literal.\n\nIf the value is an object with a *toAQL* method, the result of calling that method will be wrapped instead.\n\n**Examples**\n\n* `23` => `\"23\"`\n* `\"some string\"` => `\"some string\"`\n* `'\"some string\"'` => `\"\\\"some string\\\"\"`\n\n### List\n\nWraps the given value as an AQL List (Array) literal.\n\n`qb.list(value)`\n\nIf the value is not a JavaScript Array, an *AQLError* will be thrown.\n\nIf the value is already an AQL List, its own value will be wrapped instead.\n\nAny list elements that are not already AQL values will be converted automatically.\n\n### Object\n\nWraps the given value as an AQL Object literal.\n\n`qb.obj(value)`\n\nIf the value is not a JavaScript Object, an *AQLError* will be thrown.\n\nIf the value is already an AQL Object, its own value will be wrapped instead.\n\nAny property values that are not already AQL values will be converted automatically.\n\nAny keys that are quoted strings will be treated as string literals.\n\nAny keys that start with the character \"`:`\" will be treated as dynamic properties and must be well-formed simple references.\n\nAny other keys that need escaping will be quoted if necessary.\n\nIf you need to pass in raw JavaScript objects that shouldn't be converted according to these rules, you can use the `qb` function directly instead.\n\n**Examples**\n\n* `qb.obj({'some.name': 'value'})` => `{\"some.name\": value}`\n* `qb.obj({hello: world})` => `{hello: world}`\n* `qb.obj({'\"hello\"': world})` => `{\"hello\": world}`\n* `qb.obj({':dynamic': 'props'})` => `{[dynamic]: props}`\n* `qb.obj({': invalid': 'key'})` => throws an error (` invalid` is not a well-formed reference)\n\n### Simple Reference\n\nWraps a given value in an AQL Simple Reference.\n\n`qb.ref(value)`\n\nIf the value is not a JavaScript string or not a well-formed simple reference, an *AQLError* will be thrown.\n\nIf the value is an *ArangoCollection*, its *name* property will be used instead.\n\nIf the value is already an AQL Simple Reference, its value is wrapped instead.\n\n**Examples**\n\nValid values:\n\n* `foo`\n* `foo.bar`\n* `foo[*].bar`\n* `foo.bar.QUX`\n* `_foo._bar._qux`\n* `foo1.bar2`\n* `` `foo`.bar ``\n* `` foo.`bar` ``\n\nInvalid values:\n\n* `1foo`\n* `föö`\n* `foo bar`\n* `foo[bar]`\n\nArangoDB collection objects can be passed directly:\n\n```js\nvar myUserCollection = applicationContext.collection('users');\nvar users = db._query(qb.for('u').in(myUserCollection).return('u')).toArray();\n```\n\n## AQL Expressions\n\n### Range\n\nCreates a range expression from the given values.\n\n`qb.range(value1, value2)` => `value1..value2`\n\nOR:\n\n`aqlValue.range(value2)` => `value1..value2`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n*Alias:* `qb.to(value1, value2)`\n\n**Examples**\n\n`qb(2).to(5)` => `2..5`\n\n### Property Access\n\nCreates a property access expression from the given values.\n\n`qb.get(obj, key)` => `obj[key]`\n\nOR:\n\n`aqlObj.get(key)` => `obj[key]`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').get('y') => `x[y]`\n\n### Raw Expression\n\nWraps a given value in a raw AQL expression.\n\n`qb.expr(value)`\n\nIf the value is already an AQL Raw Expression, its value is wrapped instead.\n\n**Warning:** Whenever possible, you should use one of the other methods or a combination thereof instead of using a raw expression. Raw expressions allow passing arbitrary strings into your AQL and thus will open you to AQL injection attacks if you are passing in untrusted user input.\n\n## AQL Operations\n\n### Boolean And\n\nCreates an \"and\" operation from the given values.\n\n`qb.and(a, b)` => `(a && b)`\n\nOR:\n\n`aqlValue.and(b)` => `(a && b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n**Examples**\n\n`qb.ref('x').and('y')` => `(x && y)`\n\n### Boolean Or\n\nCreates an \"or\" operation from the given values.\n\n`qb.or(a, b)` => `(a || b)`\n\nOR:\n\n`aqlValue.or(b)` => `(a || b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n**Examples**\n\n`qb.ref('x').or('y')` => `(x || y)`\n\n### Addition\n\nCreates an addition operation from the given values.\n\n`qb.add(a, b)` => `(a + b)`\n\nOR:\n\n`aqlValue.add(b)` => `(a + b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n*Alias:* `qb.plus(a, b)`\n\n**Examples**\n\n`qb.ref('x').plus('y')` => `(x + y)`\n\n### Subtraction\n\nCreates a subtraction operation from the given values.\n\n`qb.sub(a, b)` => `(a - b)`\n\nOR:\n\n`aqlValue.sub(b)` => `(a - b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n*Alias:* `qb.minus(a, b)`\n\n**Examples**\n\n`qb.ref('x').minus('y')` => `(x - y)`\n\n### Multiplication\n\nCreates a multiplication operation from the given values.\n\n`qb.mul(a, b)` => `(a * b)`\n\nOR:\n\n`aqlValue.mul(b)` => `(a * b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n*Alias:* `qb.times(a, b)`\n\n**Examples**\n\n`qb.ref('x').times('y')` => `(x * y)`\n\n### Division\n\nCreates a division operation from the given values.\n\n`qb.div(a, b)` => `(a / b)`\n\nOR:\n\n`aqlValue.div(b)` => `(a / b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n**Examples**\n\n`qb.ref('x').div('y')` => `(x / y)`\n\n### Modulus\n\nCreates a modulus operation from the given values.\n\n`qb.mod(a, b)` => `(a % b)`\n\nOR:\n\n`aqlValue.mod(b)` => `(a % b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nThis function can take any number of arguments.\n\n**Examples**\n\n`qb.ref('x').mod('y')` => `(x % y)`\n\n### Equality\n\nCreates an equality comparison from the given values.\n\n`qb.eq(a, b)` => `(a == b)`\n\nOR:\n\n`qbValue.eq(b)` => `(a == b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').eq('y')` => `(x == y)`\n\n### Inequality\n\nCreates an inequality comparison from the given values.\n\n`qb.neq(a, b)` => `(a != b)`\n\nOR:\n\n`qbValue.neq(b)` => `(a != b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').neq('y')` => `(x != y)`\n\n### Greater Than\n\nCreates a greater-than comparison from the given values.\n\n`qb.gt(a, b)` => `(a > b)`\n\nOR\n\n`qbValue.gt(b)` => `(a > b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').gt('y')` => `(x > y)`\n\n### Greater Than Or Equal To\n\nCreates a greater-than-or-equal-to comparison from the given values.\n\n`qb.gte(a, b)` => `(a >= b)`\n\nOR\n\n`qbValue.gte(b)` => `(a >= b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').gte('y')` => `(x >= y)`\n\n### Less Than\n\nCreates a less-than comparison from the given values.\n\n`qb.lt(a, b)` => `(a < b)`\n\nOR\n\n`qbValue.lt(b)` => `(a < b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').lt('y')` => `(x < y)`\n\n### Less Than Or Equal To\n\nCreates a less-than-or-equal-to comparison from the given values.\n\n`qb.lte(a, b)` => `(a <= b)`\n\nOR\n\n`qbValue.lte(b)` => `(a <= b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n**Examples**\n\n`qb.ref('x').lte('y')` => `(x <= y)`\n\n### Contains\n\nCreates an \"in\" comparison from the given values.\n\n`qb.in(a, b)` => `(a in b)`\n\nOR:\n\n`qbValue.in(b)` => `(a in b)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n\n**Examples**\n\n`qb.ref('x').in('y')` => `(x in y)`\n\n### Negation\n\nCreates a negation from the given value.\n\n`qb.not(a)` => `!(a)`\n\nOR:\n\n`qbValue.not()` => `!(a)`\n\nIf the value is not already an AQL value, it will be converted automatically.\n\n**Examples**\n\n`qb.not('x')` => `!(x)`\n\n### Negative Value\n\nCreates a negative value expression from the given value.\n\n`qb.neg(a)` => `-(a)`\n\nOR:\n\n`qbValue.neg()` => `-(a)`\n\nIf the value is not already an AQL value, it will be converted automatically.\n\n**Examples**\n\n`qb.neg('x')` => `-(x)`\n\n### Ternary (if / else)\n\nCreates a ternary expression from the given values.\n\n`qb.if(condition, thenDo, elseDo)` => `(condition ? thenDo : elseDo)`\n\nOR:\n\n`qbValue.then(thenDo).else(elseDo)` => `(condition ? thenDo : elseDo)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\n*Alias:* `qbValue.then(thenDo).otherwise(elseDo)`\n\n**Examples**\n\n`qb.ref('x').then('y').else('z')` => `(x ? y : z)`\n\n### Function Call\n\nCreates a functon call for the given name and arguments.\n\n`qb.fn(name)(...args)`\n\nIf the values are not already AQL values, they will be converted automatically.\n\nFor built-in functions, methods with the relevant function name are already provided by the query builder.\n\n**Examples**\n\n* `qb.fn('MY::USER::FUNC')(1, 2, 3)` => `MY::USER::FUNC(1, 2, 3)`\n* `qb.fn('hello')()` => `hello()`\n* `qb.RANDOM()` => `RANDOM()`\n* `qb.FLOOR(qb.div(5, 2))` => `FLOOR((5 / 2))`\n\n## AQL Statements\n\nIn addition to the methods documented above, the query builder provides all methods of *PartialStatement* objects.\n\nAQL *Statement* objects have a method *toAQL()* which returns their AQL representation as a JavaScript string.\n\n**Examples**\n\n```js\nqb.for('doc').in('my_collection').return('doc._key').toAQL()\n// => FOR doc IN my_collection RETURN doc._key\n```\n\n### FOR expression IN collection\n\n`PartialStatement::for(expression).in(collection) : PartialStatement`\n\n\n**Examples**\n\n* `_.for('doc').in('my_collection')` => `FOR doc IN my_collection`\n\n### LET varname = expression\n\n`PartialStatement::let(varname, expression) : PartialStatement`\n\n\n**Examples**\n\n* `_.let('foo', 23)` => `LET foo = 23`\n\n### LET var1 = expr1, var2 = expr2, …, varn = exprn\n\n`PartialStatement::let(definitions) : PartialStatement`\n\n\n**Examples**\n\n* `_.let({a: 1, b: 2, c: 3})` => `LET a = 1, b = 2, c = 3`\n\n### RETURN expression\n\n`PartialStatement::return(expression) : ReturnExpression`\n\n\n**Examples**\n\n* `_.return('x')` => `RETURN x`\n* `_.return({x: 'x'})` => `RETURN {x: x}`\n\n### RETURN DISTINCT expression\n\n`PartialStatement::returnDistinct(expression) : ReturnExpression`\n\n**Examples**\n\n* `_.returnDistinct('x')` => `RETURN DISTINCT x`\n\n### FILTER expression\n\n`PartialStatement::filter(expression) : PartialStatement`\n\n**Examples**\n\n* `_.filter(qb.eq('a', 'b'))` => `FILTER a == b`\n\n### COLLECT …\n\n#### COLLECT WITH COUNT INTO varname\n\n`PartialStatement::collectWithCountInto(varname) : CollectExpression`\n\n**Examples**\n\n* `_.collectWithCountInto('x')` => `COLLECT WITH COUNT INTO x`\n\n#### COLLECT varname = expression\n\n`PartialStatement::collect(varname, expression) : CollectExpression`\n\n**Examples**\n\n* `_.collect('x', 'y')` => `COLLECT x = y`\n\n#### COLLECT var1 = expr1, var2 = expr2, …, varn = exprn\n\n`PartialStatement::collect(definitions) : CollectExpression`\n\n**Examples**\n\n* `_.collect({x: 'a', y: 'b'})` => `COLLECT x = a, y = b`\n\n#### … WITH COUNT INTO varname\n\n`CollectExpression::withCountInto(varname) : CollectExpression`\n\n**Examples**\n\n* `_.withCountInto('x')` => `WITH COUNT INTO x`\n\n#### … INTO varname\n\n`CollectExpression::into(varname) : CollectExpression`\n\n**Examples**\n\n* `_.into('z')` => `INTO z`\n\n##### … KEEP ...vars\n\n`CollectExpression::keep(...vars) : CollectExpression`\n\n**Examples**\n\n* `_.into('z').keep('a', 'b')` => `INTO z KEEP a, b`\n\n#### … INTO varname = expression\n\n`CollectExpression::into(varname, expression) : CollectExpression`\n\n**Examples**\n\n* `_.into('x', 'y')` => `INTO x = y`\n\n#### … OPTIONS options\n\n`CollectExpression::options(options) : CollectExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n### … SORT ...args\n\n`PartialStatement::sort(...args) : PartialStatement`\n\n**Examples**\n\n* `_.sort('x', 'DESC', 'y', 'ASC')` => `SORT x DESC, y ASC`\n\n### … LIMIT offset, count\n\n`PartialStatement::limit([offset,] count) : PartialStatement`\n\n**Examples**\n\n* `_.limit(20)` => `LIMIT 20`\n* `_.limit(20, 20)` => `LIMIT 20, 20`\n\n### REMOVE …\n\n#### REMOVE expression IN collection\n\n`PartialStatement::remove(expression).in(collection) : RemoveExpression`\n\n*Alias:* `remove(expression).into(collection)`\n\n**Examples**\n\n* `_.remove('x').in('y')` => `REMOVE x IN y`\n\n#### … LET varname = OLD RETURN varname\n\n`RemoveExpression::returnOld(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnOld('z')` => `LET z = OLD RETURN z`\n\n#### … OPTIONS options\n\n`RemoveExpression::options(options) : RemoveExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n### UPSERT …\n\n#### UPSERT expression1 INSERT expression2 REPLACE expression3 IN collection\n\n`PartialStatement::upsert(expression1).insert(expression2).replace(expression3).in(collection) : UpsertExpression`\n\n*Alias:* `….into(collection)`\n\n**Examples**\n\n* `_.upsert('x').insert('y').replace('z').in('c')` => `UPSERT x INSERT y REPLACE z IN c`\n\n#### UPSERT expression1 INSERT expression2 UPDATE expression3 IN collection\n\n`PartialStatement::upsert(expression1).insert(expression2).update(expression3).in(collection) : UpsertExpression`\n\n*Alias:* `….into(collection)`\n\n**Examples**\n\n* `_.upsert('x').insert('y').update('z').in('c')` => `UPSERT x INSERT y UPDATE z IN c`\n\n#### … OPTIONS options\n\n`UpsertExpression::options(options) : UpsertExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n### INSERT …\n\n#### INSERT expression INTO collection\n\n`PartialStatement::insert(expression).into(collection) : InsertExpression`\n\n*Alias:* `insert(expression).in(collection)`\n\n**Examples**\n\n* `_.insert('x').into('y')` => `INSERT x INTO y`\n\n#### … OPTIONS options\n\n`InsertExpression::options(options) : InsertExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n#### … LET varname = NEW RETURN varname\n\n`InsertExpression::returnNew(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnNew('z')` => `LET z = NEW RETURN z`\n\n### UPDATE …\n\n#### UPDATE expression IN collection\n\n`PartialStatement::update(expression).in(collection) : UpdateExpression`\n\n*Alias:* `update(expression).into(collection)`\n\n**Examples**\n\n* `_.update('x').in('y')` => `UPDATE x IN y`\n\n#### UPDATE expression1 WITH expression2 IN collection\n\n`PartialStatement::update(expression1).with(expression2).in(collection) : UpdateExpression`\n\n*Alias:* `update(expression1).with(expression2).into(collection)`\n\n**Examples**\n\n* `_.update('x').with('y').in('z')` => `UPDATE x WITH y IN z`\n\n#### … OPTIONS options\n\n`UpdateExpression::options(options) : UpdateExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n#### … LET varname = NEW RETURN varname\n\n`UpdateExpression::returnNew(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnNew('z')` => `LET z = NEW RETURN z`\n\n#### … LET varname = OLD RETURN varname\n\n`UpdateExpression::returnOld(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnOld('z')` => `LET z = OLD RETURN z`\n\n### REPLACE …\n\n#### REPLACE expression IN collection\n\n`PartialStatement::replace(expression).in(collection) : ReplaceExpression`\n\n*Alias:* `replace(expression).into(collection)`\n\n**Examples**\n\n* `_.replace('x').in('y')` => `REPLACE x IN y`\n\n#### REPLACE expression1 WITH expression2 IN collection\n\n`PartialStatement::replace(expression1).with(expression2).in(collection) : ReplaceExpression`\n\n*Alias:* `replace(expression1).with(expression2).into(collection)`\n\n**Examples**\n\n* `_.replace('x').with('y').in('z')` => `REPLACE x WITH y IN z`\n\n#### … OPTIONS options\n\n`ReplaceExpression::options(options) : ReplaceExpression`\n\n**Examples**\n\n* `_.options('opts')` => `OPTIONS opts`\n\n#### … LET varname = NEW RETURN varname\n\n`ReplaceExpression::returnOld(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnNew('z')` => `LET z = NEW RETURN z`\n\n#### … LET varname = OLD RETURN varname\n\n`ReplaceExpression::returnNew(varname) : ReturnExpression`\n\n**Examples**\n\n* `_.returnOld('z')` => `LET z = OLD RETURN z`\n\n# License\n\nThe Apache License, Version 2.0. For more information, see the accompanying LICENSE file.\n",
|
|
"readmeFilename": "README.md",
|
|
"gitHead": "2bd6cb05200c15c25769b496f2de126bee83e5c9",
|
|
"_id": "aqb@2.1.0",
|
|
"_shasum": "cc3de1656fbc7e43e8c06ade4d40262b069fafbd",
|
|
"_from": "aqb@2.1.0"
|
|
}
|