diff options
author | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:13:07 +0100 |
---|---|---|
committer | Joop Kiefte <ikojba@gmail.com> | 2023-09-28 01:13:07 +0100 |
commit | ab06569065e63cac9dbf2702e80ac8d252aa1ab4 (patch) | |
tree | ae57ab88ba49f1c0729423fd2fa1b44054d4a0f2 | |
parent | fd8e3ea34017f89750403b71aa3bc1e67ff96c95 (diff) |
change option to edit table
-rw-r--r-- | main.go | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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 ") |