...

Source file src/github.com/go-kivik/kivik/v4/driver/bulkget.go

Documentation: github.com/go-kivik/kivik/v4/driver

     1  // Licensed under the Apache License, Version 2.0 (the "License"); you may not
     2  // use this file except in compliance with the License. You may obtain a copy of
     3  // the License at
     4  //
     5  //  http://www.apache.org/licenses/LICENSE-2.0
     6  //
     7  // Unless required by applicable law or agreed to in writing, software
     8  // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
     9  // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
    10  // License for the specific language governing permissions and limitations under
    11  // the License.
    12  
    13  package driver
    14  
    15  import "context"
    16  
    17  // BulkGetReference is a reference to a document given in a [BulkGetter.BulkGet]
    18  // query.
    19  type BulkGetReference struct {
    20  	ID        string `json:"id"`
    21  	Rev       string `json:"rev,omitempty"`
    22  	AttsSince string `json:"atts_since,omitempty"`
    23  }
    24  
    25  // BulkGetter is an optional interface which may be implemented by a driver to
    26  // support bulk get operations.
    27  type BulkGetter interface {
    28  	// BulkGet uses the _bulk_get interface to fetch multiple documents in a single query.
    29  	BulkGet(ctx context.Context, docs []BulkGetReference, options Options) (Rows, error)
    30  }
    31  

View as plain text