Replace/UpsertReplace support

This commit is contained in:
Ian Gulliver
2024-06-23 16:32:28 -07:00
parent 6abf2d051e
commit fd97e6ecca
6 changed files with 89 additions and 25 deletions

12
util.go Normal file
View File

@@ -0,0 +1,12 @@
package airtable
func chunk[T any](items []T, chunkSize int) [][]T {
chunks := [][]T{}
for chunkSize < len(items) {
chunks = append(chunks, items[0:chunkSize:chunkSize])
items = items[chunkSize:]
}
return append(chunks, items)
}