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/google/cayley"
"github.com/google/cayley/config"
"github.com/google/cayley/db"
"github.com/google/cayley/graph"
"github.com/google/cayley/http"
)
@ -69,17 +69,17 @@ func main() {
}
switch cmd {
case "init":
cayley.CayleyInit(cfg, *tripleFile)
db.CayleyInit(cfg, *tripleFile)
case "load":
ts = cayley.OpenTSFromConfig(cfg)
cayley.CayleyLoad(ts, cfg, *tripleFile, false)
ts = db.OpenTSFromConfig(cfg)
db.CayleyLoad(ts, cfg, *tripleFile, false)
ts.Close()
case "repl":
ts = cayley.OpenTSFromConfig(cfg)
cayley.CayleyRepl(ts, *queryLanguage, cfg)
ts = db.OpenTSFromConfig(cfg)
db.CayleyRepl(ts, *queryLanguage, cfg)
ts.Close()
case "http":
ts = cayley.OpenTSFromConfig(cfg)
ts = db.OpenTSFromConfig(cfg)
http.CayleyHTTP(ts, cfg)
ts.Close()
default:

View file

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

View file

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

View file

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

View file

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