Reorganise to make cmd code more prominant

This commit is contained in:
kortschak 2014-06-28 02:14:09 +09:30
parent c66d6d3994
commit 639559544d
10 changed files with 393 additions and 393 deletions

View file

@ -22,8 +22,8 @@ import (
"github.com/barakmich/glog" "github.com/barakmich/glog"
"github.com/google/cayley"
"github.com/google/cayley/config" "github.com/google/cayley/config"
"github.com/google/cayley/db"
"github.com/google/cayley/graph" "github.com/google/cayley/graph"
"github.com/google/cayley/http" "github.com/google/cayley/http"
) )
@ -69,17 +69,17 @@ func main() {
} }
switch cmd { switch cmd {
case "init": case "init":
cayley.CayleyInit(cfg, *tripleFile) db.CayleyInit(cfg, *tripleFile)
case "load": case "load":
ts = cayley.OpenTSFromConfig(cfg) ts = db.OpenTSFromConfig(cfg)
cayley.CayleyLoad(ts, cfg, *tripleFile, false) db.CayleyLoad(ts, cfg, *tripleFile, false)
ts.Close() ts.Close()
case "repl": case "repl":
ts = cayley.OpenTSFromConfig(cfg) ts = db.OpenTSFromConfig(cfg)
cayley.CayleyRepl(ts, *queryLanguage, cfg) db.CayleyRepl(ts, *queryLanguage, cfg)
ts.Close() ts.Close()
case "http": case "http":
ts = cayley.OpenTSFromConfig(cfg) ts = db.OpenTSFromConfig(cfg)
http.CayleyHTTP(ts, cfg) http.CayleyHTTP(ts, cfg)
ts.Close() ts.Close()
default: default:

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package cayley package db
import ( import (
"github.com/google/cayley/config" "github.com/google/cayley/config"

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package cayley package db
import ( import (
"os" "os"

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package cayley package db
import ( import (
"github.com/barakmich/glog" "github.com/barakmich/glog"

View file

@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package cayley package db
import ( import (
"bufio" "bufio"