 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func GetEndRangeValue(value string) string
- func ValidateCollection(collection *Collection) error
- func ValidateExpressions(expressions []QueryExpression) error
- func ValidateKey(key *Key) error
- func ValidateQueryCollection(collection *Collection) error
- func ValidateQueryKey(key *Key) error
- type Collection
- type Document
- type DocumentIterator
- type DocumentService
- type ExpsSort
- type Key
- type QueryExpression
- type QueryResult
- type UnimplementedDocumentPlugin
- func (p *UnimplementedDocumentPlugin) Delete(ctx context.Context, key *Key) error
- func (p *UnimplementedDocumentPlugin) Get(ctx context.Context, key *Key) (*Document, error)
- func (p *UnimplementedDocumentPlugin) Query(ctx context.Context, collection *Collection, expressions []QueryExpression, ...) (*QueryResult, error)
- func (p *UnimplementedDocumentPlugin) QueryStream(ctx context.Context, collection *Collection, expressions []QueryExpression, ...) DocumentIterator
- func (p *UnimplementedDocumentPlugin) Set(ctx context.Context, key *Key, content map[string]interface{}) error
 
Constants ¶
const MaxSubCollectionDepth int = 1
    MaxSubCollectionDepth - maximum number of parents a collection can support. Depth is a count of the number of parents for a collection. e.g. a collection with no parent has a depth of 0 a collection with a parent has a depth of 1
const SubcollectionDelimiter = "+"
    Variables ¶
This section is empty.
Functions ¶
func GetEndRangeValue ¶
GetEndRangeValue - Get end range value to implement "startsWith" expression operator using where clause. For example with sdk.Expression("pk", "startsWith", "Customer#") this translates to: WHERE pk >= {startRangeValue} AND pk < {endRangeValue} WHERE pk >= "Customer#" AND pk < "Customer!"
func ValidateCollection ¶
func ValidateCollection(collection *Collection) error
ValidateCollection - validates a collection key, used for operations on a single document/collection e.g. Get, Set, Delete
func ValidateExpressions ¶
func ValidateExpressions(expressions []QueryExpression) error
ValidateExpressions - Validate the provided query expressions
func ValidateKey ¶
ValidateKey - validates a document key, used for operations on a single document e.g. Get, Set, Delete
func ValidateQueryCollection ¶
func ValidateQueryCollection(collection *Collection) error
ValidateQueryCollection - Validates a collection used for query operations. unique from ValidateCollection in that it calls ValidateQueryKey for the collection.Key
func ValidateQueryKey ¶
ValidateQueryKey - Validates a key used for query operations. unique from ValidateKey in that it permits blank key.Id values for wildcard query scenarios. e.g. querying values in a sub-collection for all documents in the parent collection.
Types ¶
type Collection ¶
type DocumentIterator ¶
type DocumentService ¶
type DocumentService interface {
	Get(context.Context, *Key) (*Document, error)
	Set(context.Context, *Key, map[string]interface{}) error
	Delete(context.Context, *Key) error
	Query(context.Context, *Collection, []QueryExpression, int, map[string]string) (*QueryResult, error)
	QueryStream(context.Context, *Collection, []QueryExpression, int) DocumentIterator
}
    The base Document Plugin interface Use this over proto definitions to remove dependency on protobuf in the plugin internally and open options to adding additional non-grpc interfaces
type ExpsSort ¶
type ExpsSort []QueryExpression
type Key ¶
type Key struct {
	Collection *Collection `log:"Collection"`
	Id         string      `log:"Id"`
}
    type QueryExpression ¶
type QueryResult ¶
type UnimplementedDocumentPlugin ¶
type UnimplementedDocumentPlugin struct {
	DocumentService
}
    func (*UnimplementedDocumentPlugin) Delete ¶
func (p *UnimplementedDocumentPlugin) Delete(ctx context.Context, key *Key) error
func (*UnimplementedDocumentPlugin) Query ¶
func (p *UnimplementedDocumentPlugin) Query(ctx context.Context, collection *Collection, expressions []QueryExpression, limit int, pagingToken map[string]string) (*QueryResult, error)
func (*UnimplementedDocumentPlugin) QueryStream ¶
func (p *UnimplementedDocumentPlugin) QueryStream(ctx context.Context, collection *Collection, expressions []QueryExpression, limit int) DocumentIterator