Skip to content

Commit

Permalink
docs(oquery): update pkg meta, readme
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 4, 2020
1 parent 03a1943 commit 20cce96
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 26 deletions.
30 changes: 17 additions & 13 deletions packages/oquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,22 @@ This project is part of the

Datalog-inspired, optimized pattern/predicate query engine for JS objects.

Currently, there're 125 possible query approaches, which can be
collapsed into 27 unique query implementations. Each query is based on
RDF-style
[Subject-Predicate-Object](https://www.w3.org/TR/rdf11-primer/#section-triple)
patterns (only without requiring query terms to be URIs), with each term
one of:

- `null` - wildcard, any non-null value in that position will be
selected
- Predicate function - called with all possible terms in that position
- Literal value - for subjects and predicates, this can only be a string
or number. For "object" position any value type is allowed
- Array or `Set` - multiple choices (literals) for given query term

See basic query examples below...

### Status

**ALPHA** - bleeding edge / work-in-progress
Expand All @@ -44,7 +60,7 @@ yarn add @thi.ng/oquery
<script src="https://unpkg.com/@thi.ng/oquery/lib/index.umd.js" crossorigin></script>
```

Package sizes (gzipped, pre-treeshake): ESM: 825 bytes / CJS: 881 bytes / UMD: 943 bytes
Package sizes (gzipped, pre-treeshake): ESM: 823 bytes / CJS: 883 bytes / UMD: 943 bytes

## Dependencies

Expand All @@ -60,18 +76,6 @@ Package sizes (gzipped, pre-treeshake): ESM: 825 bytes / CJS: 881 bytes / UMD: 9

TODO - Please see extensive tests for now...

There're 64 possible query approaches, each based on RDF-style
[Subject-Predicate-Object](https://www.w3.org/TR/rdf11-primer/#section-triple)
patterns (only without requiring query terms to be URIs). Each term can
be one of:

- `null` - wildcard, any non-null value in that position will be
selected
- Predicate function - called with all possible terms in that position
- Literal value - for subjects and predicates, this can only be a string
or number. For "object" position any value type is allowed
- Array or `Set` - multiple choices (literals) for given query term

```ts
import { defQuery } from "@thi.ng/oquery";

Expand Down
4 changes: 3 additions & 1 deletion packages/oquery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@
"datalog",
"es6",
"object",
"pattern",
"predicate",
"query",
"typescript"
"typescript",
"wildcard"
],
"publishConfig": {
"access": "public"
Expand Down
28 changes: 16 additions & 12 deletions packages/oquery/tpl.readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ This project is part of the

${pkg.description}

Currently, there're 125 possible query approaches, which can be
collapsed into 27 unique query implementations. Each query is based on
RDF-style
[Subject-Predicate-Object](https://www.w3.org/TR/rdf11-primer/#section-triple)
patterns (only without requiring query terms to be URIs), with each term
one of:

- `null` - wildcard, any non-null value in that position will be
selected
- Predicate function - called with all possible terms in that position
- Literal value - for subjects and predicates, this can only be a string
or number. For "object" position any value type is allowed
- Array or `Set` - multiple choices (literals) for given query term

See basic query examples below...

${status}

${supportPackages}
Expand All @@ -39,18 +55,6 @@ ${docLink}

TODO - Please see extensive tests for now...

There're 64 possible query approaches, each based on RDF-style
[Subject-Predicate-Object](https://www.w3.org/TR/rdf11-primer/#section-triple)
patterns (only without requiring query terms to be URIs). Each term can
be one of:

- `null` - wildcard, any non-null value in that position will be
selected
- Predicate function - called with all possible terms in that position
- Literal value - for subjects and predicates, this can only be a string
or number. For "object" position any value type is allowed
- Array or `Set` - multiple choices (literals) for given query term

```ts
import { defQuery } from "@thi.ng/oquery";

Expand Down

0 comments on commit 20cce96

Please sign in to comment.