Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions rai/cmds.go
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,14 @@ func listEdbNames(cmd *cobra.Command, args []string) {
action.Exit(names, nil)
}

func listTransactions(cmd *cobra.Command, args []string) {
// assert len(args) == 1
action := newAction(cmd)
action.Start("List transactions")
rsp, err := action.Client().ListTransactions()
action.Exit(rsp, err)
}

// Parse the schema option string into the schema definition map that is
// expected by the golang client.
//
Expand Down
7 changes: 7 additions & 0 deletions rai/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,13 @@ func addCommands(root *cobra.Command) {
cmd.Flags().StringP("engine", "e", "", "default engine")
root.AddCommand(cmd)

cmd = &cobra.Command{
Use: "list-transactions",
Short: "List transaction history",
Args: cobra.ExactArgs(0),
Run: listTransactions}
root.AddCommand(cmd)

cmd = &cobra.Command{
Use: "load-csv database file",
Short: "Load a CSV file into the given database",
Expand Down