mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
add doc comments
This commit is contained in:
parent
a815bba520
commit
9fb68b416c
5 changed files with 10 additions and 0 deletions
4
api.go
4
api.go
|
|
@ -1603,6 +1603,10 @@ func (api *API) ImportWithTx(ctx context.Context, qcx *Qcx, req *ImportRequest,
|
|||
return errors.Wrap(err, "committing")
|
||||
}
|
||||
|
||||
// ImportRoaringShard transactionally imports roaring-encoded data
|
||||
// across many fields in a single shard. It can both set and clear
|
||||
// bits and updates caches/bitDepth as appropriate, although only the
|
||||
// bitmap parts happen truly transactionally.
|
||||
func (api *API) ImportRoaringShard(ctx context.Context, indexName string, shard uint64, req *ImportRoaringShardRequest) error {
|
||||
index, err := api.Index(ctx, indexName)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -211,6 +211,8 @@ func OptKeyTranslateBatchSize(v int) BatchOption {
|
|||
}
|
||||
}
|
||||
|
||||
// OptUseShardTransactionalEndpoint tells the batch to import using
|
||||
// the newer shard-transactional endpoint.
|
||||
func OptUseShardTransactionalEndpoint(use bool) BatchOption {
|
||||
return func(b *Batch) error {
|
||||
b.useShardTransactionalEndpoint = use
|
||||
|
|
|
|||
|
|
@ -647,6 +647,7 @@ func (c *Client) importData(uri *pnet.URI, path string, data []byte) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// ImportRoaringShard imports into the shard-transactional endpoint.
|
||||
func (c *Client) ImportRoaringShard(index string, shard uint64, request *pilosa.ImportRoaringShardRequest) error {
|
||||
uris, err := c.getURIsForShard(index, shard)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -349,6 +349,8 @@ type ImportRoaringRequest struct {
|
|||
UpdateExistence bool
|
||||
}
|
||||
|
||||
// ImportRoaringShardRequest is the request for the shard
|
||||
// transactional endpoint.
|
||||
type ImportRoaringShardRequest struct {
|
||||
// Has this request already been forwarded to all replicas? If
|
||||
// Remote=false, then the handling server is responsible for
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ type unionContainerIterator struct {
|
|||
cur FilterKey
|
||||
}
|
||||
|
||||
// NewUnionContainerIterator unions multiple container iterators to one.
|
||||
func NewUnionContainerIterator(iters ...ContainerIterator) ContainerIterator {
|
||||
return &unionContainerIterator{
|
||||
iters: iters,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue