aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoop Kiefte <ikojba@gmail.com>2023-09-28 01:13:07 +0100
committerJoop Kiefte <ikojba@gmail.com>2023-09-28 01:13:07 +0100
commitab06569065e63cac9dbf2702e80ac8d252aa1ab4 (patch)
treeae57ab88ba49f1c0729423fd2fa1b44054d4a0f2
parentfd8e3ea34017f89750403b71aa3bc1e67ff96c95 (diff)
change option to edit table
-rw-r--r--main.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/main.go b/main.go
index fbf2199..5d8ce64 100644
--- a/main.go
+++ b/main.go
@@ -17,7 +17,7 @@ func main() {
// Print menu
fmt.Println("1. Read table names")
fmt.Println("2. Run query")
- fmt.Println("3. Run and save query")
+ fmt.Println("3. Edit table")
fmt.Println("4. Execute Dolt command")
fmt.Println("5. Exit")
fmt.Print("Enter your choice: ")
@@ -40,18 +40,13 @@ func main() {
// Table name will be empty. Run query
RunSQL(query, "")
case 3:
- // Request query
- fmt.Print("Enter your query: ")
- var query string
- fmt.Scanln(&query)
-
// Request table name
fmt.Print("Enter your table name: ")
var table string
fmt.Scanln(&table)
// Run query
- RunSQL(query, table)
+ RunSQL("select * from " + table + ";", table)
case 4:
// Request command
fmt.Print("dolt ")