Skip to content

Commit

Permalink
Fix cayley load command
Browse files Browse the repository at this point in the history
  • Loading branch information
barakmich committed Aug 9, 2014
1 parent 614184b commit 11c3cd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cayley.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func main() {
if err != nil {
break
}
err = load(ts, cfg, "", *tripleType)
err = load(ts, cfg, *tripleFile, *tripleType)
if err != nil {
break
}
Expand Down

3 comments on commit 11c3cd1

@kortschak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused about this (obviously). There are two CL arguments that can be used to specify the path to the data file. Should we drop the use of -dbpath= to specify the load path for the memstore case, and just use the -triples argument?

@barakmich
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that may be the right thing. There isn't really a dbpath to persistence, per se.

The flipside argument could be that -triples is only defined for load(), and loading from dbpath is wrong; but then you have to ask how to load memstore.

One consistent take is to have load() only look at -triples or a passed-in value and be the put a call to load() in memstore's open() and not db open(). That makes some sense. Load() is arbiter of the triple-type flag as well (same deal: if not passed in, go to flag)

@kortschak
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't let memstore load the data itself since then it needs to know about quads parsing, that's why I moved loading memstore out of db.Open previously (different place, but same issue).

Please sign in to comment.