Merge pull request #59 from alpe/minor_updates

Minor cleanup
This commit is contained in:
Barak Michener 2014-07-10 10:59:32 -04:00
commit c1471ee09e
8 changed files with 10 additions and 12 deletions

View file

@ -8,6 +8,7 @@
#
# Please keep the list sorted.
Alexander Peters <info@alexanderpeters.de>
Google Inc.
Jay Graves <jaywgraves@gmail.com>
Pius Uzamere <pius+github@alum.mit.edu>

View file

@ -11,6 +11,7 @@
#
# Please keep the list sorted.
Alexander Peters <info@alexanderpeters.de>
Barak Michener <barakmich@google.com> <barak@cayley.io> <me@barakmich.com>
Jay Graves <jaywgraves@gmail.com>
Pius Uzamere <pius+github@alum.mit.edu>

View file

@ -34,10 +34,10 @@ var queryLanguage = flag.String("query_lang", "gremlin", "Use this parser as the
var configFile = flag.String("config", "", "Path to an explicit configuration file.")
func Usage() {
fmt.Println("Cayley is a graph store and graph query layer.\n")
fmt.Println("Usage:")
fmt.Println(" cayley COMMAND [flags]\n")
fmt.Println("Commands:")
fmt.Println("Cayley is a graph store and graph query layer.")
fmt.Println("\nUsage:")
fmt.Println(" cayley COMMAND [flags]")
fmt.Println("\nCommands:")
fmt.Println(" init\tCreate an empty database.")
fmt.Println(" load\tBulk-load a triple file into the database.")
fmt.Println(" http\tServe an HTTP endpoint on the given host and port.")

View file

@ -33,8 +33,6 @@ func Load(ts graph.TripleStore, cfg *config.Config, triplePath string, firstTime
} else {
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
}
case "rethink", "rethinkdb":
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
case "leveldb":
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
case "mem":

View file

@ -49,7 +49,7 @@ type Iterator interface {
// These methods are the heart and soul of the iterator, as they constitute
// the iteration interface.
//
// To get the full results of iteraton, do the following:
// To get the full results of iteration, do the following:
// while (!Next()):
// emit result
// while (!NextResult()):

View file

@ -17,7 +17,7 @@ package iterator
// Defines one of the base iterators, the All iterator. Which, logically
// enough, represents all nodes or all links in the graph.
//
// This particular file is actually vestigal. It's up to the TripleStore to give
// This particular file is actually vestigial. It's up to the TripleStore to give
// us an All iterator that represents all things in the graph. So this is
// really the All iterator for the MemTripleStore. That said, it *is* one of
// the base iterators, and it helps just to see it here.

View file

@ -74,7 +74,7 @@ type TripleStore interface {
// Optimize an iterator in the context of the triple store.
// Suppose we have a better index for the passed tree; this
// gives the TripleStore the oppotunity to replace it
// gives the TripleStore the opportunity to replace it
// with a more efficient iterator.
OptimizeIterator(it Iterator) (Iterator, bool)
@ -82,7 +82,7 @@ type TripleStore interface {
// sever connections, etc)
Close()
// Convienence function for speed. Given a triple token and a direction
// Convenience function for speed. Given a triple token and a direction
// return the node token for that direction. Sometimes, a TripleStore
// can do this without going all the way to the backing store, and
// gives the TripleStore the opportunity to make this optimization.

View file

@ -77,7 +77,6 @@ func (api *Api) ServeV1Query(w http.ResponseWriter, r *http.Request, params http
default:
return FormatJson400(w, "Need a query language.")
}
var err error
bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil {
return FormatJson400(w, err)
@ -126,7 +125,6 @@ func (api *Api) ServeV1Shape(w http.ResponseWriter, r *http.Request, params http
default:
return FormatJson400(w, "Need a query language.")
}
var err error
bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil {
return FormatJson400(w, err)