Fix typos and minor cleanup

This commit is contained in:
Alex Peters 2014-07-08 12:57:44 +02:00
parent 9ca38d1f10
commit 4d34ea50cc
8 changed files with 10 additions and 12 deletions

View file

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

View file

@ -11,6 +11,7 @@
# #
# Please keep the list sorted. # Please keep the list sorted.
Alexander Peters <info@alexanderpeters.de>
Barak Michener <barakmich@google.com> <barak@cayley.io> <me@barakmich.com> Barak Michener <barakmich@google.com> <barak@cayley.io> <me@barakmich.com>
Jay Graves <jaywgraves@gmail.com> Jay Graves <jaywgraves@gmail.com>
Pius Uzamere <pius+github@alum.mit.edu> 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.") var configFile = flag.String("config", "", "Path to an explicit configuration file.")
func Usage() { func Usage() {
fmt.Println("Cayley is a graph store and graph query layer.\n") fmt.Println("Cayley is a graph store and graph query layer.")
fmt.Println("Usage:") fmt.Println("\nUsage:")
fmt.Println(" cayley COMMAND [flags]\n") fmt.Println(" cayley COMMAND [flags]")
fmt.Println("Commands:") fmt.Println("\nCommands:")
fmt.Println(" init\tCreate an empty database.") fmt.Println(" init\tCreate an empty database.")
fmt.Println(" load\tBulk-load a triple file into the 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.") 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 { } else {
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize) LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
} }
case "rethink", "rethinkdb":
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
case "leveldb": case "leveldb":
LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize) LoadTriplesFromFileInto(ts, triplePath, cfg.LoadSize)
case "mem": case "mem":

View file

@ -49,7 +49,7 @@ type Iterator interface {
// These methods are the heart and soul of the iterator, as they constitute // These methods are the heart and soul of the iterator, as they constitute
// the iteration interface. // 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()): // while (!Next()):
// emit result // emit result
// while (!NextResult()): // while (!NextResult()):

View file

@ -17,7 +17,7 @@ package iterator
// Defines one of the base iterators, the All iterator. Which, logically // Defines one of the base iterators, the All iterator. Which, logically
// enough, represents all nodes or all links in the graph. // 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 // 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 // really the All iterator for the MemTripleStore. That said, it *is* one of
// the base iterators, and it helps just to see it here. // 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. // Optimize an iterator in the context of the triple store.
// Suppose we have a better index for the passed tree; this // 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. // with a more efficient iterator.
OptimizeIterator(it Iterator) (Iterator, bool) OptimizeIterator(it Iterator) (Iterator, bool)
@ -82,7 +82,7 @@ type TripleStore interface {
// sever connections, etc) // sever connections, etc)
Close() 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 // return the node token for that direction. Sometimes, a TripleStore
// can do this without going all the way to the backing store, and // can do this without going all the way to the backing store, and
// gives the TripleStore the opportunity to make this optimization. // 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: default:
return FormatJson400(w, "Need a query language.") return FormatJson400(w, "Need a query language.")
} }
var err error
bodyBytes, err := ioutil.ReadAll(r.Body) bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil { if err != nil {
return FormatJson400(w, err) return FormatJson400(w, err)
@ -126,7 +125,6 @@ func (api *Api) ServeV1Shape(w http.ResponseWriter, r *http.Request, params http
default: default:
return FormatJson400(w, "Need a query language.") return FormatJson400(w, "Need a query language.")
} }
var err error
bodyBytes, err := ioutil.ReadAll(r.Body) bodyBytes, err := ioutil.ReadAll(r.Body)
if err != nil { if err != nil {
return FormatJson400(w, err) return FormatJson400(w, err)