Added the "export -all" switch (#54)
Extended the "export" command with an "-all" flag. When included, all rows of the table matching the query will be exported to CSV.
This commit is contained in:
parent
20a9a8c758
commit
ed53173a1d
10 changed files with 150 additions and 44 deletions
|
|
@ -9,6 +9,14 @@ func All[T any](ts []T, predicate func(t T) bool) bool {
|
|||
return true
|
||||
}
|
||||
|
||||
func Generate[U any](from, to int, fn func(t int) U) []U {
|
||||
us := make([]U, to-from+1)
|
||||
for i := from; i <= to; i++ {
|
||||
us[i-from] = fn(i)
|
||||
}
|
||||
return us
|
||||
}
|
||||
|
||||
func Map[T, U any](ts []T, fn func(t T) U) []U {
|
||||
us := make([]U, len(ts))
|
||||
for i, t := range ts {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue