Skip to content

Commit 800cb9b

Browse files
committed
edit: readme, contributing
1 parent 2359f4c commit 800cb9b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

.github/CONTRIBUTING.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,19 @@ When contributing code, please:
2727
and should be the only version branch available. Don't hesitate to ask if it
2828
is unclear.
2929
4) make changes
30-
5) add tests; currently using mochai/chai
30+
5) add tests; using mochai/chai
3131
run tests with e.g. `yarn test tests/glob`
3232
or
3333
`yarn tests` to run the suite
34-
6) add comments to your functions, and if possible, in the
34+
see [testing](#testing) for more information.
35+
6) add comments, and if possible, in the
3536
[typedoc](https://github.com/TypeStrong/typedoc) style
3637
7) submit a merge request from your forked branch into the
3738
latest HP4k1h5/AQLqueryBuilder `v.X.X.X` branch.
39+
40+
41+
### testing
42+
43+
all tests that require a live arango instance are run with root:"" no
44+
permissions on `localhost:8529`. This can be modified in test files that
45+
require db access.

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ presence of the phrase "optional phrase". If no mandatory or exclude terms are
5555
provided, optional terms are considered required, so as not to retrieve all
5656
documents.
5757

58+
See [default query syntax](#default-query-syntax) and this schematic
59+
[example](#example) for more details.
60+
5861
If multiple collections are passed, the above queried is essentially
5962
replicated across all collections, see examples in 'tests/cols.ts'. In the
6063
future this will also accommodate multiple key searches.
@@ -117,7 +120,7 @@ const queryObject = {
117120
}
118121
const aqlQuery = buildAQL(queryObject)
119122
// ... const cursor = await db.query(aqlQuery)
120-
// ... const cursor = await db.query(aqlQuery, {start:20, end:40})
123+
// ... const cursor = await db.query(buildAQL(queryObject, {start:20, end:40})
121124
```
122125
`collections` is an array of `collection` objects. This allows searching and
123126
filtering across collections impacted by the search.
@@ -209,7 +212,7 @@ by one of the following symbols `+ ? -`, or the plus-sign, the question-mark,
209212
and the minus-sign. If a word has no operator prefix, it is considered
210213
optional and is counted as an `OR`.
211214

212-
Example:
215+
#### Example
213216
input `one +two -"buckle my shoe"` and the queryParser will interpret as
214217
follows:
215218

0 commit comments

Comments
 (0)