{"modulePath":"github.com/cloudquery/plugin-sdk/v4","version":"v4.100.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package batch\n\n## Functions\n\n```go\nfunc SliceRecord(r arrow.RecordBatch, limit *Cap) (add *SlicedRecord, flush []arrow.RecordBatch, remaining *SlicedRecord)\n```\nSliceRecord will return the SlicedRecord you can add to the batch given the restrictions provided (if any). The meaning of the returned values: - \\`add\\` is good to be added to the current batch that the caller is assembling - \\`flush\\` represents sliced arrow.Record that needs own batch to be flushed - \\`remaining\\` represents the overflow of the batch after \\`add\\` \u0026 \\`flush\\` are processed Note that the \\`limit\\` provided will not be updated.\n\n```go\nfunc SplitRecord(r arrow.RecordBatch, limit *Cap) []arrow.RecordBatch\n```\n\n## Types\n\n```go\ntype Cap struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc CappedAt(bytes, rows int64) *Cap\n```\n\n```go\nfunc (c *Cap) AddRows(rows int64)\n```\n\n```go\nfunc (c *Cap) AddSlice(record *SlicedRecord)\n```\n\n```go\nfunc (c *Cap) ReachedLimit() bool\n```\n\n```go\nfunc (c *Cap) Reset()\n```\n\n```go\nfunc (c *Cap) Rows() int64\n```\n\n```go\ntype SlicedRecord struct {\n\tarrow.RecordBatch\n\tBytes int64 // we need this as the util.TotalRecordSize will report the full size even for the sliced record\n\t// contains filtered or unexported fields\n}\n```\n\n","path":"github.com/cloudquery/plugin-sdk/v4/internal/batch","name":"batch","synopsis":"","isRedistributable":true}
