{"_id":"@swimlane/rql","_rev":"194-8bafdce2072ccf7a67bf29368db1c895","name":"@swimlane/rql","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@swimlane/rql","version":"1.0.0","keywords":["resource","query","language","uri"],"author":{"name":"Swimlane","email":"dev@swimlane.com"},"_id":"@swimlane/rql@1.0.0","maintainers":[{"name":"hankconn","email":"hankconn@gmail.com"},{"name":"dgkincaid","email":"douglas.kincaid@swimlane.com"},{"name":"amiranda","email":"alvaro.miranda@swimlane.com"},{"name":"aacebo","email":"aacebowork@gmail.com"},{"name":"dmikov","email":"dmikov@gmail.com"},{"name":"luisbe90","email":"luisbe090@gmail.com"},{"name":"jondavidford","email":"jondavidford@gmail.com"},{"name":"jacobheater-swimlane","email":"jacob.heater@swimlane.com"},{"name":"swimmark","email":"mark.reeder@swimlane.com"},{"name":"zbartl","email":"zach.bartlett@swimlane.com"},{"name":"haeminn","email":"haeminp@umich.edu"},{"name":"duredhel","email":"duredhel313@gmail.com"},{"name":"michael.baswell","email":"michael.baswell@swimlane.com"},{"name":"seangrimes","email":"sean.grimes@swimlane.com"},{"name":"brantw","email":"brantw@gmail.com"},{"name":"nick-allen","email":"nick.allen.cse@gmail.com"},{"name":"shaunburdick","email":"npm@shaunburdick.com"},{"name":"marjan-georgiev","email":"marjan.georgiev@gmail.com"},{"name":"danstory","email":"danstory@gmail.com"},{"name":"hypercubed","email":"hypercubed@gmail.com"}],"homepage":"https://github.com/swimlane/rql#readme","bugs":{"url":"https://github.com/swimlane/rql/issues"},"dist":{"shasum":"ab173ca1b06241ac90bbf2767623b6e0b0ae0547","tarball":"https://registry.npmjs.org/@swimlane/rql/-/rql-1.0.0.tgz","fileCount":11,"integrity":"sha512-Cu/ohfMORpFPpTak4CTi1M90vfoU3eUJ1AfgOVFrpzysEVAic3WOz4LHiDDq/jfym2v5r03snRy55fS274ouZw==","signatures":[{"sig":"MEUCIQDXhit55EyaaKQ8Vr2K+REpITpbz32eV+DRmIrr5DOQYQIgUdC5tsNdb4jeyvzLxklTiFsgudfxLqb9nrYEXJ83huY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":109961,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/Pt7CRA9TVsSAnZWagAAEEAP/0xDavfWOVFerz/582G+\nnQAuJvlF8Z2pN1dZmnVgiqzd2u6uGCla8erP36dm8SceHEN71nKxe72RfJDO\ngoS1WerhOkDyxAmxu/TtqvWd7sY1qicy9GH50y3NC3kW3yhIi1lsx2wayTdL\n5ocTGbpD5jwE15svRpO4rT2nwaw85duEr+6Z39Tg5AGG9iMyKq9CWs1OoplU\no7nMafeUf1dhHR0cM9w3tQzVO5JKDNObF0+ze3sDuFwAa7BuvWlK9ahLzmY8\nYN5KAcK1ekflThVaKXDok/9H6PPiYZA/1V3VR3LiQk9eQxPS4JUjHdbFUgMP\nCeaERLmL4jsvIjwxsyxSxVWme+R2JYx9ycaKxJt7xClneJKWaY9Z0EkAUBXv\np43iJN+fRomz2xK8zYC0PBhFWP+ai3ReCDfG42XoHFxMWSZeXhXKD0swPX/d\nxAZS/i8Cjz7c38sW4UaLZ2h3atdKSfAZzasWE4oblfamV+k4T/qFGuQoLE49\nCRTeHhrwF/L+5pu3q3lhxFU2xVx64Mjpb2IhUK4WtvKw238oPodtk0U44KFL\n+DHHPh1c+AKBzeQRX9gC46RadAwwMiYxmORgIjYT6QSFMKlgDZLkimDQUhmi\nUPloQutyWKIJIuPELowg9zl57NAC05P6x65On6biAAB/c0ah8qNYj/HH5AAj\nxfup\r\n=slAK\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"8c0c171c61c6be3b91adbca2578126d4a5460b6c","scripts":{"lint":"tslint \"./src/**/*.ts\"","test":"npm run test:ts && npm run test:style && npm run test:unit","build":"npm run build:clean && npm run build:ts","test:ts":"tsc --noemit","build:ts":"tsc -p tsconfig.build.json","lint:fix":"npm run lint -- --fix","prettier":"prettier --write \"./src/**/*.{js,ts,html,scss,css,md,json}\"","test:unit":"jest","test:style":"npm run prettier:test && npm run lint","build:clean":"rimraf dist/*","prettier:test":"prettier -c \"./src/**/*.{js,ts,html,scss,css,md,json}\""},"_npmUser":{"name":"hankconn","email":"hankconn@gmail.com"},"repository":{"url":"git+ssh://git@github.com/swimlane/rql.git","type":"git"},"_npmVersion":"6.13.3","description":"Resource Query Language (RQL) is a query language for web.","directories":{},"_nodeVersion":"10.16.3","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0","rimraf":"^3.0.0","tslint":"^5.20.1","ts-jest":"^24.1.0","prettier":"^1.16.4","typescript":"^3.7.2","@types/jest":"^24.0.22","npm-run-all":"^4.1.5","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-config-swimlane":"^4.0.0","@swimlane/prettier-config-swimlane":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rql_1.0.0_1576860538484_0.9657743319681202","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@swimlane/rql","version":"1.0.1","keywords":["resource","query","language","uri"],"author":{"name":"Swimlane","email":"dev@swimlane.com"},"_id":"@swimlane/rql@1.0.1","maintainers":[{"name":"aacebo","email":"aacebowork@gmail.com"},{"name":"amiranda","email":"alvaro.miranda@swimlane.com"},{"name":"brantw","email":"brantw@gmail.com"},{"name":"danstory","email":"danstory@gmail.com"},{"name":"dgkincaid","email":"douglas.kincaid@swimlane.com"},{"name":"dmikov","email":"dmikov@gmail.com"},{"name":"duredhel","email":"duredhel313@gmail.com"},{"name":"haeminn","email":"haeminp@umich.edu"},{"name":"hankconn","email":"hankconn@gmail.com"},{"name":"hypercubed","email":"hypercubed@gmail.com"},{"name":"jacobheater-swimlane","email":"jacob.heater@swimlane.com"},{"name":"jondavidford","email":"jondavidford@gmail.com"},{"name":"luisbe90","email":"luisbe090@gmail.com"},{"name":"marjan-georgiev","email":"marjan.georgiev@gmail.com"},{"name":"michael.baswell","email":"michael.baswell@swimlane.com"},{"name":"nick-allen","email":"nick.allen.cse@gmail.com"},{"name":"seangrimes","email":"sean.grimes@swimlane.com"},{"name":"shaunburdick","email":"npm@shaunburdick.com"},{"name":"swimmark","email":"mark.reeder@swimlane.com"},{"name":"zbartl","email":"zach.bartlett@swimlane.com"}],"homepage":"https://github.com/swimlane/rql#readme","bugs":{"url":"https://github.com/swimlane/rql/issues"},"dist":{"shasum":"e6747cf92af07dc92efd44e25880c8818f112fff","tarball":"https://registry.npmjs.org/@swimlane/rql/-/rql-1.0.1.tgz","fileCount":13,"integrity":"sha512-qCTTYWhC1Qjv+rn4huNkHhRgZpqgi74GH9FuN7aTkAUCoFMj7rzsLgM5PUy0C9BSBrEtFBCwbiDMhYMtD1oJNA==","signatures":[{"sig":"MEYCIQDpHF16YRs4xHY7xRrOqbqe0cGXJNOeoTLGDMgLpLt68QIhAOGgUxK5RKKRg44yVkA0uQAr9BCEyg1ER0OqBJjAP65Q","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111231,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/QWWCRA9TVsSAnZWagAA3goP/i9aCRabiTc8FJ5VLjtu\n9H3+8UdEr3biSbGIy63bunZWBnXPZxCOHqPsAk+0ie/sN6DppPGi3WsrzqtS\nte4X9+17BziO8K3ouObzrjyw9qN8PxLLQmzHOnNfqXgkKZ5xnq/91wz7SCYC\nuoMX/AR9ywxX9JNpgACdpBZHpwV6EPcrUJfpi4S5pE4axB0BVRkJ5qyrc4Ep\nzkDzZITruhfeThOF7szzcEqx8eN4ROw/HMJU7E4cTJKXnGUO6cEcGrnDDok/\nWXncEYRfZ2zurCRaxFvS3rpyDfSLuL4mLkcJlbUvJmjwdcZ/bWDCEuoNBJOR\nq7uSJEjHeF/g35TB8U9c7eQgTzAjfeKPkC4foAahaIrpSPnMU6Siz2i8V11y\nAuroRQ1vpfIzpttsfpyzDPL/xOpOWLQVOEsNt/nriotsLmAsoVjvKpBmyDKp\nkXLDRqZ9fcjfqTGPOZK237UWnAr0wiyi+8Mok07uHz4F8wjFX8PdYSZVdCWb\n07KkONCgveVwyq+sloGZV/7mB602L/pEnJ3fMhmxaOP2aosrUq7fCaMj6rB4\nG1d7T3GPlaKMYATtOAQaIPdpBI5SmmqB7gZypkXC9009lenbeKC66acR8WPb\nNzeiqF+IjD9uC/I2CbU+wr5HD+ecz3LhXF11fGaInwVXAWPjj0Bzuqb8jcok\nG7Cy\r\n=NnzI\r\n-----END PGP SIGNATURE-----\r\n"},"gitHead":"b7ad0f361d43902dd0d89b4fed58c1d6fb5bc7a5","scripts":{"lint":"tslint \"./src/**/*.ts\"","test":"npm run test:ts && npm run test:style && npm run test:unit","build":"npm run build:clean && npm run build:ts","test:ts":"tsc --noemit","build:ts":"tsc -p tsconfig.build.json","lint:fix":"npm run lint -- --fix","prettier":"prettier --write \"./src/**/*.{js,ts,html,scss,css,md,json}\"","test:unit":"jest","test:style":"npm run prettier:test && npm run lint","build:clean":"rimraf dist/*","prettier:test":"prettier -c \"./src/**/*.{js,ts,html,scss,css,md,json}\""},"_npmUser":{"name":"hankconn","email":"hankconn@gmail.com"},"repository":{"url":"git+ssh://git@github.com/swimlane/rql.git","type":"git"},"_npmVersion":"6.13.3","description":"Resource Query Language (RQL) is a query language for web.","directories":{},"_nodeVersion":"10.16.3","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0","rimraf":"^3.0.0","tslint":"^5.20.1","ts-jest":"^24.1.0","prettier":"^1.16.4","typescript":"^3.7.2","@types/jest":"^24.0.22","npm-run-all":"^4.1.5","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-config-swimlane":"^4.0.0","@swimlane/prettier-config-swimlane":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rql_1.0.1_1576863120914_0.6326872457702573","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@swimlane/rql","version":"1.0.2","keywords":["resource","query","language","uri"],"author":{"name":"Swimlane","email":"dev@swimlane.com"},"_id":"@swimlane/rql@1.0.2","maintainers":[{"name":"aacebo","email":"aacebowork@gmail.com"},{"name":"amiranda","email":"alvaro.miranda@swimlane.com"},{"name":"brantw","email":"brantw@gmail.com"},{"name":"danstory","email":"danstory@gmail.com"},{"name":"dgkincaid","email":"douglas.kincaid@swimlane.com"},{"name":"dmikov","email":"dmikov@gmail.com"},{"name":"duredhel","email":"duredhel313@gmail.com"},{"name":"haeminn","email":"haeminp@umich.edu"},{"name":"hankconn","email":"hankconn@gmail.com"},{"name":"hypercubed","email":"hypercubed@gmail.com"},{"name":"jacobheater-swimlane","email":"jacob.heater@swimlane.com"},{"name":"jondavidford","email":"jondavidford@gmail.com"},{"name":"luisbe90","email":"luisbe090@gmail.com"},{"name":"marjan-georgiev","email":"marjan.georgiev@gmail.com"},{"name":"michael.baswell","email":"michael.baswell@swimlane.com"},{"name":"nick-allen","email":"nick.allen.cse@gmail.com"},{"name":"seangrimes","email":"sean.grimes@swimlane.com"},{"name":"shaunburdick","email":"npm@shaunburdick.com"},{"name":"swimmark","email":"mark.reeder@swimlane.com"},{"name":"zbartl","email":"zach.bartlett@swimlane.com"}],"homepage":"https://github.com/swimlane/rql#readme","bugs":{"url":"https://github.com/swimlane/rql/issues"},"dist":{"shasum":"d0c8bc629ba7eaddba9fb342c66e30aba4a203ac","tarball":"https://registry.npmjs.org/@swimlane/rql/-/rql-1.0.2.tgz","fileCount":13,"integrity":"sha512-yGmu2awzmPulFH6JGpmwIB48+c4cVKEzAlcNoTviEMAJjH2cn7E+UN3gJtrSkbohNSFPcvTCYTBmorXQ+o/OOA==","signatures":[{"sig":"MEYCIQC3o1C3MJ+UVIZLOGCIwLMwuTBLG8iqP+MOT+HKU57X2gIhAPHGV8h4gjYcejeATsO5pv4qRbwmMIwJSH6tyeeunTdc","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":111401,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd/Qc6CRA9TVsSAnZWagAALnUP/i5hOaDnCxbMM1nb/tH1\nwoz0Vpah8L9wTlO4LZYzae+Qj58EPOirAkd1KaDQHDa8tZmYdCXFYs1vZlbQ\n442O1c3wDSjFFFq2Cof1CFoQLH7OCnbNke9DQ4jH0xDthAj1kM/WMcnKkk9y\nZdyTWGY29/D7E2RYuIK71DM1bCUpnFxV5BzSAg1mW49ICuRDqkbuxa1Q+aOL\n+nQwXRSzx85CaegFtawXBaUA5dQn4dzetzTcTUYEo855zwD3omAEIRLGu77q\nKsveTq3mSpBnUEZ/pCTJIKeLrXhkuoYfoyBUwxNSN1ZVyAOeu6qU4MtbvMME\nhKKYJxtD6DF/OZoDdXGxzd20b0YweewUmgUCJMbySQXbwdFTrgFSpETTJUp1\n0X5iyCsoJp0SDcylA414zi8r5nd8BGKEv7lyD9TxWjxYk1YuJ0rKm/6zTCDh\ny99KvVRbreOfOXe1etSzXn8hNb5s2p8kHhBdSU6PkdNNLdD9YaD0dzfsig8x\nKfHFuzyCig+ReZ18wUwXBj+KhTM/5tQdE1Ti3GsuXd+tCy4RnilBq4FCvQey\n6slTRH+E2AkYk8Qbcr5GtRh2s0vPF7ssgDDEiTwol30JrAoiDNcywOyyc0iO\nuoXwevLCCd4vUYsodbouyMPvxf7VpB4oQy/WdJYgQdshBfF428DkxZL6STUL\n6Qdi\r\n=BZJ1\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"5cf525cdfc7cfc0499c371acf68dfba4ea755cd5","scripts":{"lint":"tslint \"./src/**/*.ts\"","test":"npm run test:ts && npm run test:style && npm run test:unit","build":"npm run build:clean && npm run build:ts","test:ts":"tsc --noemit","build:ts":"tsc -p tsconfig.build.json","lint:fix":"npm run lint -- --fix","prettier":"prettier --write \"./src/**/*.{js,ts,html,scss,css,md,json}\"","test:unit":"jest","test:style":"npm run prettier:test && npm run lint","build:clean":"rimraf dist/*","prettier:test":"prettier -c \"./src/**/*.{js,ts,html,scss,css,md,json}\""},"_npmUser":{"name":"hankconn","email":"hankconn@gmail.com"},"repository":{"url":"git+ssh://git@github.com/swimlane/rql.git","type":"git"},"_npmVersion":"6.13.3","description":"Resource Query Language (RQL) is a query language for web.","directories":{},"_nodeVersion":"10.16.3","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^24.9.0","rimraf":"^3.0.0","tslint":"^5.20.1","ts-jest":"^24.1.0","prettier":"^1.16.4","typescript":"^3.7.2","@types/jest":"^24.0.22","npm-run-all":"^4.1.5","tslint-config-prettier":"^1.18.0","tslint-config-security":"^1.16.0","tslint-config-swimlane":"^4.0.0","@swimlane/prettier-config-swimlane":"^2.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rql_1.0.2_1576863546210_0.7831371150688802","host":"s3://npm-registry-packages"}}},"time":{"created":"2019-12-20T16:48:58.484Z","modified":"2026-07-14T10:28:03.725Z","1.0.0":"2019-12-20T16:48:58.690Z","1.0.1":"2019-12-20T17:32:01.418Z","1.0.2":"2019-12-20T17:39:06.384Z"},"bugs":{"url":"https://github.com/swimlane/rql/issues"},"author":{"name":"Swimlane","email":"dev@swimlane.com"},"homepage":"https://github.com/swimlane/rql#readme","keywords":["resource","query","language","uri"],"repository":{"url":"git+ssh://git@github.com/swimlane/rql.git","type":"git"},"description":"Resource Query Language (RQL) is a query language for web.","maintainers":[{"email":"hansstoetzer1@gmail.com","name":"hansstoetzer"},{"email":"ben.steele@swimlane.com","name":"bensteele7"},{"email":"brantw@gmail.com","name":"brantw"},{"email":"marjan.georgiev@gmail.com","name":"marjan-georgiev"},{"email":"danstory@gmail.com","name":"danstory"},{"email":"ryan.knauer@swimlane.com","name":"bageldawg"},{"email":"it.admin@swimlane.com","name":"it.admin.swim"},{"email":"roy.araya@swimlane.com","name":"royar95"},{"email":"developers@swimlane.com","name":"swimlane.dev"},{"email":"manideep.laxmishetty@swimlane.com","name":"manideep-swimlane"},{"email":"ian.schultz@swimlane.com","name":"ischultz-swimlane"},{"email":"Jogaj_26@hotmail.com","name":"jogaj_26"},{"email":"nicholas.tausek@gmail.com","name":"nikkuman"},{"email":"sarath.pantula@swimlane.com","name":"sarath.pantula"},{"email":"grandhi.subrahmanyam@swimlane.com","name":"grandhi_subrahmanyam"},{"email":"daniel.abbott@swimlane.com","name":"dabbott-sl"},{"email":"dmytro.skorokhodov@swimlane.com","name":"dmytro_skorokhodov"},{"email":"koushik.kumar@swimlane.com","name":"koushik.kumar"},{"email":"steveblue@gmail.com","name":"steveblue"},{"email":"prasanth.boyina@swimlane.com","name":"prasanthsaiboyina"},{"email":"ashray.gupta@swimlane.com","name":"ashraygupta"},{"email":"surya.pabbineedi@swimlane.com","name":"surya-pabbineedi"},{"email":"anurag.pasupureddi@swimlane.com","name":"anurag-p"},{"email":"anjali.tiwari@swimlane.com","name":"anjali.tiwari"}],"readme":"# @swimlane/rql\n\n[![Build Status](https://travis-ci.org/swimlane/rql.svg?branch=master)](https://travis-ci.org/swimlane/rql)\n\nResource Query Language (RQL) is a query language designed for use in URIs with object\nstyle data structures. This project includes the RQL specification and\nprovides a JavaScript implementation of query\nparsing and query execution implementation for JavaScript arrays. The JavaScript library\nsupports AMD and NodeJS/CommonJS module format so it can be run in the browser or\nin the server. RQL can be thought as basically a set of\nnestable named operators which each have a set of arguments. RQL is designed to\nhave an extremely simple, but extensible grammar that can be written in a URL friendly query string. A simple RQL\nquery with a single operator that indicates a search for any resources with a property of\n\"foo\" that has value of 3 could be written:\n\n    eq(foo,3)\n\nRQL is a compatible superset of standard HTML form URL encoding. The following query\nis identical to the query (it is sugar for the query above):\n\n    foo=3\n\nSuch that this can be used in URIs like:\n\n    http://example.org/data?foo=3\n\n# JavaScript Library\n\nUsing the JavaScript library we can construct queries\n\n    import { RQLQuery } from '@swimlane/rql';\n\tconst rqlQuery = RQLQuery.parse('eq(foo,3)');\n\n# RQL Rules\n\nThe RQL grammar is based around standard URI delimiters. The standard rules for\nencoding strings with URL encoding (%xx) are observed. RQL also supersets FIQL.\nTherefore we can write a query that finds resources with a \"price\" property below\n10 with a \"lt\" operator using FIQL syntax:\n\n    price=lt=10\n\nWhich is identical (and sugar for call operator syntax known as the normalized form):\n\n    lt(price,10)\n\nOne can combine conditions with multiple operators with \"&\":\n\n    foo=3&price=lt=10\n\nIs the same as:\n\n    eq(foo,3)&lt(price,10)\n\nWhich is also the same as:\n\n    and(eq(foo,3),lt(price,10))\n\nThe | operator can be used to indicate an \"or\" operation. We can also use paranthesis\nto group expressions. For example:\n\n    (foo=3|foo=bar)&price=lt=10\n\nWhich is the same as:\n\n    and(or(eq(foo,3),eq(foo,bar)),lt(price,10))\n\nValues in queries can be strings (using URL encoding), numbers, booleans, null, undefined,\nand dates (in ISO UTC format without colon encoding). We can also denote arrays\nwith paranthesis enclosed, comma separated values. For example to find the objects\nwhere foo can be the number 3, the string bar, the boolean true, or the date for the\nfirst day of the century we could write an array with the \"in\" operator:\n\n    foo=in=(3,bar,true,2000-01-01T00:00:00Z)\n\nWe can also explicitly specify primitive types in queries. To explicitly specify a string \"3\",\nwe can do:\n\n    foo=string:3\n\nAny property can be nested by using an array of properties. To search by the bar property of\nthe object in the foo property we can do:\n\n    (foo,bar)=3\n\nWe can also use slashes as shorthand for arrays, so we could equivalently write the nested\nquery:\n\n    foo/bar=3\n\nAnother common operator is sort. We can use the sort operator to sort by a specified property.\nTo sort by foo in ascending order:\n\n\tprice=lt=10&sort(+foo)\n\nWe can also do multiple property sorts. To sort by price in ascending order and rating in descending order:\n\n    sort(+price,-rating)\n\nThe aggregate function can be used for aggregation. To calculate the sum of sales for\neach department:\n\n    aggregate(departmentId,sum(sales))\n\nHere is a definition of the common operators (individual stores may have support\nfor more less operators):\n\n* sort(&lt;+|->&lt;property) - Sorts by the given property in order specified by the prefix (+ for ascending, - for descending)\n* select(&lt;property>,&lt;property>,...) - Trims each object down to the set of properties defined in the arguments\n* values(&lt;property>) - Returns an array of the given property value for each object\n* aggregate(&lt;property|function>,...) - Aggregates the array, grouping by objects that are distinct for the provided properties, and then reduces the remaining other property values using the provided functions\n* distinct() - Returns a result set with duplicates removed\n* in(&lt;property>,&lt;array-of-values>) - Filters for objects where the specified property's value is in the provided array\n* out(&lt;property>,&lt;array-of-values>) - Filters for objects where the specified property's value is not in the provided array\n* contains(&lt;property>,&lt;value | expression>) - Filters for objects where the specified property's value is an array and the array contains any value that equals the provided value or satisfies the provided expression.\n* excludes(&lt;property>,&lt;value | expression>) - Filters for objects where the specified property's value is an array and the array does not contain any of value that equals the provided value or satisfies the provided expression.\n* limit(count,start,maxCount) - Returns the given range of objects from the result set\n* and(&lt;query>,&lt;query>,...) - Applies all the given queries\n* or(&lt;query>,&lt;query>,...) - The union of the given queries\n* eq(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is equal to the provided value\n* lt(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is less than the provided value\n* le(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is less than or equal to the provided value\n* gt(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is greater than the provided value\n* ge(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is greater than or equal to the provided value\n* ne(&lt;property>,&lt;value>) - Filters for objects where the specified property's value is not equal to the provided value\n* rel(&lt;relation name?>,&lt;query>) - Applies the provided query against the linked data of the provided relation name.\n* sum(&lt;property?>) - Finds the sum of every value in the array or if the property argument is provided, returns the sum of the value of property for every object in the array\n* mean(&lt;property?>) - Finds the mean of every value in the array or if the property argument is provided, returns the mean of the value of property for every object in the array\n* max(&lt;property?>) - Finds the maximum of every value in the array or if the property argument is provided, returns the maximum of the value of property for every object in the array\n* min(&lt;property?>) - Finds the minimum of every value in the array or if the property argument is provided, returns the minimum of the value of property for every object in the array\n* recurse(&lt;property?>) - Recursively searches, looking in children of the object as objects in arrays in the given property value\n* first() - Returns the first record of the query's result set\n* one() - Returns the first and only record of the query's result set, or produces an error if the query's result set has more or less than one record in it.\n* count() - Returns the count of the number of records in the query's result set\n\n# Converters\n\nPrefix a value in your RQL string with a converter to explicitly identify its type.\n\nExample:\n```\nRQLQuery.parse('eq(dateField,date:2020-01-01T00:00:00')\n```\n\nAvailable converters:\n\n- number: Parse a number from a string.\n- epoch: Parse a date from a string containing a number representing a UTC timestamp.\n- isodate: Parse a date from a string in ISO date format.\n- date: Parse a date from a string in YYYY-MM-DDTHH:mm:ss.SSSZ format.\n- boolean: Parse a boolean from a string. The string must be 'true' (case insensitive), otherwise it is false.\n- string: Parse as a string regardless of string contents. Also will URL decode the string.\n- ire: Parse a case-insensitive regular expression from a string.\n- re: Parse a case-sensitive regular expression from a string.\n- json: Parse JSON from a string.\n\nBy default if no converter is specified, the string value will be attempted to be parsed as a number or as json, otherwise it will be a string value.\n\n# JavaScript Modules\n\n## rql/query\n\n    import { RQLQuery } from '@swimlane/rql';\n\nThis module allows us to construct queries.\nQuery objects have a \"name\" property and an \"args\" with an array of the arguments.\nFor example:\n\n\tRQLQuery.parse(\"(foo=3|foo=bar)&price=lt=10\") ->\n\t{\n\t\tname: \"and\",\n\t\targs: [\n\t\t\t{\n\t\t\t\tname:\"or\",\n\t\t\t\targs:[\n\t\t\t\t\t{\n\t\t\t\t\t\tname:\"eq\",\n\t\t\t\t\t\targs:[\"foo\",3]\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tname:\"eq\",\n\t\t\t\t\t\targs:[\"foo\",\"bar\"]\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t},\n\t\t\t{\n\t\t\t\tname:\"lt\",\n\t\t\t\targs:[\"price\",10]\n\t\t\t}\n\t\t]\n\t}\n\nInstallation\n========\n\nRQL can be installed using any standard package manager, for example with NPM:\n\n    npm install @swimlane/rql\n\nLicensing\n--------\n\nThis project licensed under the AFL or BSD license.\n\nCredits\n--------\n\nThis RQL library was originally forked from the `persvr/rql` project, fixing a number issues including:\n\n- Date parsing\n- Converting RQL arrays to string format was broken\n- Added support for spaces, quotes, and delimiters\n\nThis is a [Swimlane](http://swimlane.com) open-source project; we believe in giving back to the open-source community by sharing some of the projects we build for our application. Swimlane is an automated cyber security operations and incident response platform that enables cyber security teams to leverage threat intelligence, speed up incident response and automate security operations.\n\n[SecOps Hub](http://secopshub.com) is an open, product-agnostic, online community for security professionals to share ideas, use cases, best practices, and incident response strategies.","readmeFilename":"README.md"}