Skip to content

Commit

Permalink
Update the REPL run function name
Browse files Browse the repository at this point in the history
  • Loading branch information
xllora committed Mar 3, 2016
1 parent 3713504 commit cbdc9c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/vcli/bw/repl/repl.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func REPL(driver storage.Store, input *os.File, rl readLiner, chanSize int) int
continue
}
if strings.HasPrefix(l, "run") {
path, cmds, err := loadData(ctx, driver, chanSize, l)
path, cmds, err := runBQLFromFile(ctx, driver, chanSize, l)
if err != nil {
fmt.Printf("[ERROR] %s\n\n", err)
} else {
Expand Down Expand Up @@ -117,8 +117,8 @@ func printHelp() {
fmt.Println()
}

// loadData loads all the triples in the file into the current driver.
func loadData(ctx context.Context, driver storage.Store, chanSize int, line string) (string, int, error) {
// runBQLFromFile loads all the statements in the file and runs them.
func runBQLFromFile(ctx context.Context, driver storage.Store, chanSize int, line string) (string, int, error) {
ss := strings.Split(strings.TrimSpace(line), " ")
if len(ss) != 2 {
return "", 0, fmt.Errorf("wrong syntax: run <file_with_bql_statements>")
Expand Down

0 comments on commit cbdc9c4

Please sign in to comment.