Commit graph

14 commits

Author SHA1 Message Date
kortschak
ffb52af00b Rename GremlinTimeout -> Timeout
Given that there may be other Turing complete query interfaces
(particularly a Go query API), the timeout config should not be
specifically tied to gremlin.
2014-08-02 23:28:24 +09:30
kortschak
09943c3eb6 Move sexp into query 2014-07-31 09:36:43 +09:30
kortschak
a6cf432313 Move query interface definitions into query 2014-07-31 08:52:24 +09:30
kortschak
41f6d3fd84 Temporarily use cquads only
I intend to make this configurable, but there is tight connection
between db.Load and db.Open that is getting in the way of that.

Testing on data set 30kmoviedata.cq.gz created by doing:

zcat 30kmoviedata.nq.gz | sed 's/[<>]//g' | gzip -c > 30kmoviedata.cq.gz

The following query is successful:

[{
  "type": "/film/film",
  "name": null,
  "/film/film/directed_by": {
    "name": "David Fincher"
  },
  "/film/film/starring": [{
    "/film/performance/actor": {
      "name": null
    }
  }]
}]

TODO: fix up naming for quads and make strict parsing an option.
2014-07-28 21:56:32 +09:30
kortschak
401c58426f Create quads hierarchy
* Move nquads into quad.
* Create cquads simplified parser in quad.
* Move Triple (renamed Quad) to quad.

Also made sure mongo actually implements BulkLoader.
2014-07-28 21:36:22 +09:30
kortschak
d76213fb2d Handle comments in N-Quad documents and REPL
The parser rejects an N-Quad with a comment, so we filter those out
ahead of time. This simplifies the grammar and code generated by the
parser.
2014-07-25 11:22:24 +09:30
kortschak
0e0e382d2b Use error returns and interface type for parsing
Fixes issue #72

This change simplifies interactions with parsing N-Quads and makes
reading datasets more robust. Changes made while here also improve
performance:

benchmark           old ns/op     new ns/op     delta
BenchmarkParser     1058          667           -36.96%

We still use string concatenation which I'm not wildly happy about, but
I think this can be left for a later change.

Initial changes towards idiomatic error handling have been made. More
significant changes are needed, but these have subtle design implication
and need to be thought about more.

30kmoviesdata.nt.gz has been altered to properly escape double quotes.
This was done mechanically and with manual curation to pick up
straglers.
2014-07-22 20:34:37 +09:30
kortschak
177059cc16 Destutter nquads 2014-06-28 13:33:00 +09:30
kortschak
40f3363cde Destutter graph/... 2014-06-28 13:29:16 +09:30
kortschak
913d567ae1 Destutter mql 2014-06-28 12:58:03 +09:30
kortschak
3a673a333c Destutter gremlin 2014-06-28 12:55:21 +09:30
kortschak
388618bfa7 Destutter cayley/config 2014-06-28 12:42:15 +09:30
kortschak
c4a19a4e35 Simplify names in cmd source 2014-06-28 12:38:51 +09:30
kortschak
639559544d Reorganise to make cmd code more prominant 2014-06-28 02:14:09 +09:30