Results struct cleanup (#627)

* Add results format test
* Init results slice before formatting data
* Add extra test for nil check in CSV function
This commit is contained in:
Dan Sosedoff
2022-12-21 15:02:40 -06:00
committed by GitHub
parent aeb9dc24ad
commit 1897bef08d
3 changed files with 46 additions and 28 deletions

View File

@@ -34,15 +34,6 @@ type Client struct {
ConnectionString string `json:"connection_string"`
}
// Struct to hold table rows browsing options
type RowsOptions struct {
Where string // Custom filter
Offset int // Number of rows to skip
Limit int // Number of rows to fetch
SortColumn string // Column to sort by
SortOrder string // Sort direction (ASC, DESC)
}
func getSchemaAndTable(str string) (string, string) {
chunks := strings.Split(str, ".")
if len(chunks) == 1 {