issue-28: added default limit as a setting (#29)
This commit is contained in:
parent
93ec519127
commit
efdc7f9e25
11 changed files with 194 additions and 148 deletions
|
|
@ -34,6 +34,7 @@ func main() {
|
|||
var flagLocal = flag.String("local", "", "local endpoint")
|
||||
var flagDebug = flag.String("debug", "", "file to log debug messages")
|
||||
var flagRO = flag.Bool("ro", false, "enable readonly mode")
|
||||
var flagDefaultLimit = flag.Int("default-limit", 0, "default limit for queries and scans")
|
||||
var flagWorkspace = flag.String("w", "", "workspace file")
|
||||
flag.Parse()
|
||||
|
||||
|
|
@ -82,6 +83,11 @@ func main() {
|
|||
cli.Fatalf("unable to set read-only mode: %v", err)
|
||||
}
|
||||
}
|
||||
if *flagDefaultLimit > 0 {
|
||||
if err := settingStore.SetDefaultLimit(*flagDefaultLimit); err != nil {
|
||||
cli.Fatalf("unable to set default limit: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
tableService := tables.NewService(dynamoProvider, settingStore)
|
||||
workspaceService := workspaces_service.NewService(resultSetSnapshotStore)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue