Documentation ¶
Overview ¶
Package ravendb implements a driver for RavenDB NOSQL document database.
For more documentation see https://github.com/ravendb/ravendb-go-client/blob/master/readme.md
Index ¶
- Constants
- Variables
- func FieldsFor(s interface{}) []string
- func GetCollectionNameDefault(entityOrType interface{}) string
- func GetWrappedError(err error) error
- func IsPlural(word string) bool
- func IsSingular(word string) bool
- func NewHttpPost(uri string, data []byte) (*http.Request, error)
- func ParseTime(s string) (time.Time, error)
- func Pluralize(word string, count int, inclusive bool) string
- func RaftId() (string, error)
- func RoundToServerTime(t time.Time) time.Time
- func ToPlural(word string) string
- func ToSingular(word string) string
- func WithFiddler() error
- type AdvancedSessionExtensionBase
- type AdvancedSessionOperations
- func (o *AdvancedSessionOperations) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
- func (o *AdvancedSessionOperations) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
- func (o *AdvancedSessionOperations) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
- func (o *AdvancedSessionOperations) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
- func (o *AdvancedSessionOperations) Attachments() *AttachmentsSessionOperations
- func (o *AdvancedSessionOperations) Clear()
- func (o *AdvancedSessionOperations) ClusterTransaction() *ClusterTransactionOperations
- func (o *AdvancedSessionOperations) Defer(commands ...ICommandData)
- func (o *AdvancedSessionOperations) Eagerly() *EagerSessionOperations
- func (o *AdvancedSessionOperations) Evict(entity interface{}) error
- func (o *AdvancedSessionOperations) Exists(id string) (bool, error)
- func (o *AdvancedSessionOperations) GetChangeVectorFor(instance interface{}) (*string, error)
- func (o *AdvancedSessionOperations) GetCurrentSessionNode() (*ServerNode, error)
- func (o *AdvancedSessionOperations) GetDocumentID(instance interface{}) string
- func (o *AdvancedSessionOperations) GetDocumentStore() *DocumentStore
- func (o *AdvancedSessionOperations) GetLastModifiedFor(instance interface{}) (*time.Time, error)
- func (o *AdvancedSessionOperations) GetMaxNumberOfRequestsPerSession() int
- func (o *AdvancedSessionOperations) GetMetadataFor(instance interface{}) (*MetadataAsDictionary, error)
- func (o *AdvancedSessionOperations) GetNumberOfRequests() int
- func (o *AdvancedSessionOperations) GetRequestExecutor() *RequestExecutor
- func (o *AdvancedSessionOperations) HasChanged(entity interface{}) (bool, error)
- func (o *AdvancedSessionOperations) HasChanges() bool
- func (o *AdvancedSessionOperations) IgnoreChangesFor(entity interface{}) error
- func (o *AdvancedSessionOperations) Increment(entity interface{}, path string, valueToAdd interface{}) error
- func (o *AdvancedSessionOperations) IncrementByID(id string, path string, valueToAdd interface{}) error
- func (o *AdvancedSessionOperations) IsLoaded(id string) bool
- func (o *AdvancedSessionOperations) Lazily() *LazySessionOperations
- func (o *AdvancedSessionOperations) LoadIntoStream(ids []string, output io.Writer) error
- func (o *AdvancedSessionOperations) LoadStartingWith(results interface{}, args *StartsWithArgs) error
- func (o *AdvancedSessionOperations) LoadStartingWithIntoStream(output io.Writer, args *StartsWithArgs) error
- func (o *AdvancedSessionOperations) Patch(entity interface{}, path string, value interface{}) error
- func (o *AdvancedSessionOperations) PatchArray(entity interface{}, pathToArray string, arrayAdder func(*JavaScriptArray)) error
- func (o *AdvancedSessionOperations) PatchArrayByID(id string, pathToArray string, arrayAdder func(*JavaScriptArray)) error
- func (o *AdvancedSessionOperations) PatchByID(id string, path string, value interface{}) error
- func (o *AdvancedSessionOperations) Query(opts *DocumentQueryOptions) *DocumentQuery
- func (o *AdvancedSessionOperations) QueryCollection(collectionName string) *DocumentQuery
- func (o *AdvancedSessionOperations) QueryCollectionForType(typ reflect.Type) *DocumentQuery
- func (o *AdvancedSessionOperations) QueryIndex(indexName string) *DocumentQuery
- func (o *AdvancedSessionOperations) RawQuery(rawQuery string) *RawDocumentQuery
- func (o *AdvancedSessionOperations) Refresh(entity interface{}) error
- func (o *AdvancedSessionOperations) RemoveAfterSaveChangesListener(handlerID int)
- func (o *AdvancedSessionOperations) RemoveBeforeDeleteListener(handlerID int)
- func (o *AdvancedSessionOperations) RemoveBeforeQueryListener(handlerID int)
- func (o *AdvancedSessionOperations) RemoveBeforeStoreListener(handlerID int)
- func (o *AdvancedSessionOperations) Revisions() *RevisionsSessionOperations
- func (o *AdvancedSessionOperations) SetMaxNumberOfRequestsPerSession(n int)
- func (o *AdvancedSessionOperations) SetTransactionMode(mode TransactionMode)
- func (o *AdvancedSessionOperations) Stream(args *StartsWithArgs) (*StreamIterator, error)
- func (o *AdvancedSessionOperations) StreamQuery(query *DocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
- func (o *AdvancedSessionOperations) StreamQueryInto(query *DocumentQuery, output io.Writer) error
- func (o *AdvancedSessionOperations) StreamRawQuery(query *RawDocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
- func (o *AdvancedSessionOperations) StreamRawQueryInto(query *RawDocumentQuery, output io.Writer) error
- func (o *AdvancedSessionOperations) WaitForIndexesAfterSaveChanges(options func(*IndexesWaitOptsBuilder))
- func (o *AdvancedSessionOperations) WaitForReplicationAfterSaveChanges(options func(*ReplicationWaitOptsBuilder))
- func (o *AdvancedSessionOperations) WhatChanged() (map[string][]*DocumentsChanges, error)
- type AfterSaveChangesEventArgs
- type AggregationDocumentQuery
- type AggressiveCacheOptions
- type AllTopologyNodesDownError
- type AttachmentDetails
- type AttachmentName
- type AttachmentResult
- type AttachmentType
- type AttachmentsSessionOperations
- type AuthorizationError
- type BadRequestError
- type BadResponseError
- type BatchCommand
- type BatchOperation
- type BatchOptions
- type BeforeDeleteEventArgs
- type BeforeQueryEventArgs
- type BeforeStoreEventArgs
- type BulkInsertAbortedError
- type BulkInsertCommand
- type BulkInsertOperation
- func (o *BulkInsertOperation) Abort() error
- func (o *BulkInsertOperation) Close() error
- func (o *BulkInsertOperation) GetID(entity interface{}) (string, error)
- func (o *BulkInsertOperation) Store(entity interface{}, metadata *MetadataAsDictionary) (string, error)
- func (o *BulkInsertOperation) StoreWithID(entity interface{}, id string, metadata *MetadataAsDictionary) error
- func (o *BulkInsertOperation) WaitForID() error
- type BulkInsertProtocolViolationError
- type CancelFunc
- type CancellationError
- type CertificateNameMismatchError
- type ChangeProcessingError
- type ChangeType
- type CircleCriteria
- type ClientConfiguration
- type ClientVersionMismatchError
- type ClusterRequestExecutor
- type ClusterTopology
- type ClusterTransactionOperations
- func (cto *ClusterTransactionOperations) Clear()
- func (cto *ClusterTransactionOperations) CreateCompareExchangeValue(key string, item interface{}) (interface{}, error)
- func (cto *ClusterTransactionOperations) DeleteCompareExchangeValue(item *CompareExchangeValue) error
- func (cto *ClusterTransactionOperations) DeleteCompareExchangeValueByKey(key string, index int64) error
- func (cto *ClusterTransactionOperations) GetCompareExchangeValue(clazz reflect.Type, key string) (*CompareExchangeValue, error)
- func (cto *ClusterTransactionOperations) GetCompareExchangeValues(clazz reflect.Type, startsWith string, start int, pageSize int) (map[string]*CompareExchangeValue, error)
- func (cto *ClusterTransactionOperations) GetCompareExchangeValuesWithKeys(clazz reflect.Type, keys []string) (map[string]*CompareExchangeValue, error)
- func (cto *ClusterTransactionOperations) GetNumberOfTrackedCompareExchangeValues() int
- func (cto *ClusterTransactionOperations) IsTracked(key string) bool
- type CmpXchg
- type CollectionStatistics
- type CollectionStats
- type CommandData
- type CommandExecutionError
- type CommandType
- type CompactDatabaseCommand
- type CompactDatabaseOperation
- type CompactSettings
- type CompareExchangeResult
- type CompareExchangeSessionValue
- func (cesv *CompareExchangeSessionValue) Create(item interface{}) (interface{}, error)
- func (cesv *CompareExchangeSessionValue) Delete(index int64)
- func (cesv *CompareExchangeSessionValue) GetCommand(session *InMemoryDocumentSessionOperations) (ICommandData, error)
- func (cesv *CompareExchangeSessionValue) GetValue(clazz reflect.Type, session *InMemoryDocumentSessionOperations) (*CompareExchangeValue, error)
- func (cesv *CompareExchangeSessionValue) UpdateState(index int64) error
- func (cesv *CompareExchangeSessionValue) UpdateValue(value *CompareExchangeValue) error
- type CompareExchangeValue
- func (cev *CompareExchangeValue) GetIndex() int64
- func (cev *CompareExchangeValue) GetKey() string
- func (cev *CompareExchangeValue) GetMetadata() *MetadataAsDictionary
- func (cev *CompareExchangeValue) GetValue() interface{}
- func (cev *CompareExchangeValue) HasMetadata() bool
- func (cev *CompareExchangeValue) SetIndex(index int64)
- type CompareExchangeValueState
- type CompilationError
- type ConcurrencyCheckMode
- type ConcurrencyError
- type ConfigureRevisionsCommand
- type ConfigureRevisionsOperation
- type ConfigureRevisionsOperationResult
- type Conflict
- type ConflictError
- type ConflictSolver
- type ConnectionString
- type ConnectionStringType
- type CreateDatabaseCommand
- type CreateDatabaseOperation
- type CreateSampleDataCommand
- type CreateSampleDataOperation
- type CreateSubscriptionCommand
- type CreateSubscriptionResult
- type CurrentIndexAndNode
- type DatabaseChanges
- func (c *DatabaseChanges) AddConnectionStatusChanged(handler func()) int
- func (c *DatabaseChanges) AddOnError(handler func(error)) int
- func (c *DatabaseChanges) Close()
- func (c *DatabaseChanges) EnsureConnectedNow() error
- func (c *DatabaseChanges) ForAllDocuments(cb func(*DocumentChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForAllIndexes(cb func(*IndexChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForAllOperations(cb func(change *OperationStatusChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForDocument(docID string, cb func(*DocumentChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForDocumentsInCollection(collectionName string, cb func(*DocumentChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForDocumentsInCollectionOfType(clazz reflect.Type, cb func(*DocumentChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForDocumentsStartingWith(docIDPrefix string, cb func(*DocumentChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForIndex(indexName string, cb func(*IndexChange)) (CancelFunc, error)
- func (c *DatabaseChanges) ForOperationID(operationID int64, cb func(*OperationStatusChange)) (CancelFunc, error)
- func (c *DatabaseChanges) RemoveConnectionStatusChanged(handlerID int)
- func (c *DatabaseChanges) RemoveOnError(handlerID int)
- type DatabaseConcurrentLoadTimeoutError
- type DatabaseDisabledError
- type DatabaseDoesNotExistError
- type DatabaseLoadFailureError
- type DatabaseLoadTimeoutError
- type DatabaseNotRelevantError
- type DatabasePromotionStatus
- type DatabasePutResult
- type DatabaseRecord
- type DatabaseRecordWithEtag
- type DatabaseStatistics
- type DatabaseTopology
- type DeleteAttachmentCommand
- type DeleteAttachmentCommandData
- type DeleteAttachmentOperation
- type DeleteByIndexCommand
- type DeleteByQueryOperation
- type DeleteCommandData
- type DeleteCompareExchangeCommandData
- type DeleteCompareExchangeValueOperation
- type DeleteDatabaseCommand
- type DeleteDatabaseParameters
- type DeleteDatabaseResult
- type DeleteDatabasesOperation
- func NewDeleteDatabasesOperation(databaseName string, hardDelete bool) *DeleteDatabasesOperation
- func NewDeleteDatabasesOperation2(databaseName string, hardDelete bool, fromNode string, ...) *DeleteDatabasesOperation
- func NewDeleteDatabasesOperationWithParameters(parameters *DeleteDatabaseParameters) *DeleteDatabasesOperation
- type DeleteDocumentCommand
- type DeleteIndexCommand
- type DeleteIndexOperation
- type DeleteSubscriptionCommand
- type DisableIndexCommand
- type DisableIndexOperation
- type DocumentChange
- type DocumentChangeTypes
- type DocumentConflictError
- type DocumentConventions
- func (c *DocumentConventions) Clone() *DocumentConventions
- func (c *DocumentConventions) Freeze()
- func (c *DocumentConventions) GenerateDocumentID(databaseName string, entity interface{}) (string, error)
- func (c *DocumentConventions) GetDocumentIDGenerator() DocumentIDGeneratorFunc
- func (c *DocumentConventions) GetIdentityPartsSeparator() string
- func (c *DocumentConventions) GetIdentityProperty(clazz reflect.Type) string
- func (c *DocumentConventions) GetTransformClassCollectionNameToDocumentIdPrefix() func(string) string
- func (c *DocumentConventions) IsDisableTopologyUpdates() bool
- func (c *DocumentConventions) SetDisableTopologyUpdates(disable bool)
- func (c *DocumentConventions) SetDocumentIDGenerator(documentIDGenerator DocumentIDGeneratorFunc)
- func (c *DocumentConventions) TryConvertValueForQuery(fieldName string, value interface{}, forRange bool, stringValue *string) bool
- func (c *DocumentConventions) UpdateFrom(configuration *ClientConfiguration)
- type DocumentDoesNotExistError
- type DocumentIDGeneratorFunc
- type DocumentQuery
- func (q *DocumentQuery) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
- func (q *DocumentQuery) AddOrder(fieldName string, descending bool) *DocumentQuery
- func (q *DocumentQuery) AddOrderWithOrdering(fieldName string, descending bool, ordering OrderingType) *DocumentQuery
- func (q *DocumentQuery) AddParameter(name string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) AggregateByFacet(facet FacetBase) *AggregationDocumentQuery
- func (q *DocumentQuery) AggregateByFacets(facets ...*Facet) *AggregationDocumentQuery
- func (q *DocumentQuery) AggregateUsing(facetSetupDocumentID string) *AggregationDocumentQuery
- func (q *DocumentQuery) AndAlso() *DocumentQuery
- func (q DocumentQuery) Any() (bool, error)
- func (q *DocumentQuery) Boost(boost float64) *DocumentQuery
- func (q *DocumentQuery) CloseSubclause() *DocumentQuery
- func (q *DocumentQuery) ContainsAll(fieldName string, values []interface{}) *DocumentQuery
- func (q *DocumentQuery) ContainsAny(fieldName string, values []interface{}) *DocumentQuery
- func (q DocumentQuery) Count() (int, error)
- func (q DocumentQuery) CountLazily() (*Lazy, error)
- func (q *DocumentQuery) Distinct() *DocumentQuery
- func (q DocumentQuery) Err() error
- func (q *DocumentQuery) Exact() *DocumentQuery
- func (q DocumentQuery) First(result interface{}) error
- func (q *DocumentQuery) Fuzzy(fuzzy float64) *DocumentQuery
- func (q DocumentQuery) GetIndexQuery() (*IndexQuery, error)
- func (q DocumentQuery) GetResults(results interface{}) error
- func (q *DocumentQuery) GroupBy(fieldName string, fieldNames ...string) *GroupByDocumentQuery
- func (q *DocumentQuery) GroupByFieldWithMethod(field *GroupBy, fields ...*GroupBy) *GroupByDocumentQuery
- func (q *DocumentQuery) Include(path string) *DocumentQuery
- func (q *DocumentQuery) Intersect() *DocumentQuery
- func (q DocumentQuery) Lazily() (*Lazy, error)
- func (q *DocumentQuery) MoreLikeThis(moreLikeThis MoreLikeThisBase) *DocumentQuery
- func (q *DocumentQuery) MoreLikeThisWithBuilder(builder func(IMoreLikeThisBuilderForDocumentQuery)) *DocumentQuery
- func (q *DocumentQuery) NoCaching() *DocumentQuery
- func (q *DocumentQuery) NoTracking() *DocumentQuery
- func (q *DocumentQuery) Not() *DocumentQuery
- func (q *DocumentQuery) OpenSubclause() *DocumentQuery
- func (q *DocumentQuery) OrElse() *DocumentQuery
- func (q *DocumentQuery) OrderBy(field string) *DocumentQuery
- func (q *DocumentQuery) OrderByDescending(field string) *DocumentQuery
- func (q *DocumentQuery) OrderByDescendingWithOrdering(field string, ordering OrderingType) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceDescendingLatLong(fieldName string, latitude float64, longitude float64) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceDescendingLatLongDynamic(field DynamicSpatialField, latitude float64, longitude float64) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceDescendingWkt(fieldName string, shapeWkt string) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceDescendingWktDynamic(field DynamicSpatialField, shapeWkt string) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceLatLong(fieldName string, latitude float64, longitude float64) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceLatLongDynamic(field DynamicSpatialField, latitude float64, longitude float64) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceWkt(fieldName string, shapeWkt string) *DocumentQuery
- func (q *DocumentQuery) OrderByDistanceWktDynamic(field DynamicSpatialField, shapeWkt string) *DocumentQuery
- func (q *DocumentQuery) OrderByScore() *DocumentQuery
- func (q *DocumentQuery) OrderByScoreDescending() *DocumentQuery
- func (q *DocumentQuery) OrderByWithOrdering(field string, ordering OrderingType) *DocumentQuery
- func (q *DocumentQuery) Proximity(proximity int) *DocumentQuery
- func (q *DocumentQuery) RandomOrdering() *DocumentQuery
- func (q *DocumentQuery) RandomOrderingWithSeed(seed string) *DocumentQuery
- func (q *DocumentQuery) RelatesToShape(fieldName string, shapeWkt string, relation SpatialRelation) *DocumentQuery
- func (q *DocumentQuery) RelatesToShapeWithError(fieldName string, shapeWkt string, relation SpatialRelation, ...) *DocumentQuery
- func (q *DocumentQuery) RemoveBeforeQueryExecutedListener(idx int) *DocumentQuery
- func (q *DocumentQuery) Search(fieldName string, searchTerms string) *DocumentQuery
- func (q *DocumentQuery) SearchWithOperator(fieldName string, searchTerms string, operator SearchOperator) *DocumentQuery
- func (q *DocumentQuery) SelectFields(projectionType reflect.Type, fieldsIn ...string) *DocumentQuery
- func (q *DocumentQuery) SelectFieldsWithQueryData(projectionType reflect.Type, queryData *QueryData) *DocumentQuery
- func (q DocumentQuery) Single(result interface{}) error
- func (q *DocumentQuery) Skip(count int) *DocumentQuery
- func (q *DocumentQuery) Spatial2(field DynamicSpatialField, ...) *DocumentQuery
- func (q *DocumentQuery) Spatial3(fieldName string, clause func(*SpatialCriteriaFactory) SpatialCriteria) *DocumentQuery
- func (q *DocumentQuery) Statistics(stats **QueryStatistics) *DocumentQuery
- func (q *DocumentQuery) SuggestUsing(suggestion SuggestionBase) *SuggestionDocumentQuery
- func (q *DocumentQuery) Take(count int) *DocumentQuery
- func (q *DocumentQuery) UsingDefaultOperator(queryOperator QueryOperator) *DocumentQuery
- func (q *DocumentQuery) WaitForNonStaleResults(waitTimeout time.Duration) *DocumentQuery
- func (q *DocumentQuery) Where(fieldName string, op string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereBetween(fieldName string, start interface{}, end interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereEndsWith(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereEquals(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereEqualsWithMethodCall(fieldName string, method MethodCall) *DocumentQuery
- func (q *DocumentQuery) WhereEqualsWithParams(whereParams *whereParams) *DocumentQuery
- func (q *DocumentQuery) WhereExists(fieldName string) *DocumentQuery
- func (q *DocumentQuery) WhereGreaterThan(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereGreaterThanOrEqual(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereIn(fieldName string, values []interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereLessThan(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereLessThanOrEqual(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereLucene(fieldName string, whereClause string) *DocumentQuery
- func (q *DocumentQuery) WhereNotEquals(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WhereNotEqualsWithMethod(fieldName string, method MethodCall) *DocumentQuery
- func (q *DocumentQuery) WhereNotEqualsWithParams(whereParams *whereParams) *DocumentQuery
- func (q *DocumentQuery) WhereRegex(fieldName string, pattern string) *DocumentQuery
- func (q *DocumentQuery) WhereStartsWith(fieldName string, value interface{}) *DocumentQuery
- func (q *DocumentQuery) WithinRadiusOf(fieldName string, radius float64, latitude float64, longitude float64) *DocumentQuery
- func (q *DocumentQuery) WithinRadiusOfWithUnits(fieldName string, radius float64, latitude float64, longitude float64, ...) *DocumentQuery
- func (q *DocumentQuery) WithinRadiusOfWithUnitsAndError(fieldName string, radius float64, latitude float64, longitude float64, ...) *DocumentQuery
- type DocumentQueryCustomization
- func (d *DocumentQueryCustomization) AddAfterQueryExecutedListener(action func(*QueryResult)) int
- func (d *DocumentQueryCustomization) AddAfterStreamExecutedCallback(action func(map[string]interface{})) int
- func (d *DocumentQueryCustomization) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
- func (d *DocumentQueryCustomization) GetQueryOperation() *queryOperation
- func (d *DocumentQueryCustomization) NoCaching()
- func (d *DocumentQueryCustomization) NoTracking()
- func (d *DocumentQueryCustomization) RandomOrdering()
- func (d *DocumentQueryCustomization) RandomOrderingWithSeed(seed string)
- func (d *DocumentQueryCustomization) RemoveAfterQueryExecutedListener(idx int)
- func (d *DocumentQueryCustomization) RemoveAfterStreamExecutedCallback(idx int)
- func (d *DocumentQueryCustomization) RemoveBeforeQueryExecutedListener(idx int)
- func (d *DocumentQueryCustomization) WaitForNonStaleResults(waitTimeout time.Duration)
- type DocumentQueryOptions
- type DocumentSession
- func (s *DocumentSession) Advanced() *AdvancedSessionOperations
- func (s *DocumentSession) Attachments() *AttachmentsSessionOperations
- func (s *DocumentSession) Eagerly() *EagerSessionOperations
- func (s *DocumentSession) Exists(id string) (bool, error)
- func (s *DocumentSession) Include(path string) *MultiLoaderWithInclude
- func (s *DocumentSession) Increment(entity interface{}, path string, valueToAdd interface{}) error
- func (s *DocumentSession) IncrementByID(id string, path string, valueToAdd interface{}) error
- func (s *DocumentSession) Lazily() *LazySessionOperations
- func (s *DocumentSession) Load(result interface{}, id string) error
- func (s *DocumentSession) LoadIntoStream(ids []string, output io.Writer) error
- func (s *DocumentSession) LoadMulti(results interface{}, ids []string) error
- func (s *DocumentSession) LoadStartingWith(results interface{}, args *StartsWithArgs) error
- func (s *DocumentSession) LoadStartingWithIntoStream(output io.Writer, args *StartsWithArgs) error
- func (s *DocumentSession) Patch(entity interface{}, path string, value interface{}) error
- func (s *DocumentSession) PatchArray(entity interface{}, pathToArray string, arrayAdder func(*JavaScriptArray)) error
- func (s *DocumentSession) PatchArrayByID(id string, pathToArray string, arrayAdder func(*JavaScriptArray)) error
- func (s *DocumentSession) PatchByID(id string, path string, value interface{}) error
- func (s *DocumentSession) Query(opts *DocumentQueryOptions) *DocumentQuery
- func (s *DocumentSession) QueryCollection(collectionName string) *DocumentQuery
- func (s *DocumentSession) QueryCollectionForType(typ reflect.Type) *DocumentQuery
- func (s *DocumentSession) QueryIndex(indexName string) *DocumentQuery
- func (s *DocumentSession) RawQuery(rawQuery string) *RawDocumentQuery
- func (s *DocumentSession) Refresh(entity interface{}) error
- func (s *DocumentSession) Revisions() *RevisionsSessionOperations
- func (s *DocumentSession) SaveChanges() error
- func (s *DocumentSession) Stream(args *StartsWithArgs) (*StreamIterator, error)
- func (s *DocumentSession) StreamQuery(query *DocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
- func (s *DocumentSession) StreamQueryInto(query *DocumentQuery, output io.Writer) error
- func (s *DocumentSession) StreamRawQuery(query *RawDocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
- func (s *DocumentSession) StreamRawQueryInto(query *RawDocumentQuery, output io.Writer) error
- type DocumentSessionAttachments
- func (s *DocumentSessionAttachments) Exists(documentID string, name string) (bool, error)
- func (s *DocumentSessionAttachments) Get(entity interface{}, name string) (*AttachmentResult, error)
- func (s *DocumentSessionAttachments) GetByID(documentID string, name string) (*AttachmentResult, error)
- func (s *DocumentSessionAttachments) GetRevision(documentID string, name string, changeVector *string) (*AttachmentResult, error)
- type DocumentSessionAttachmentsBase
- func (s *DocumentSessionAttachmentsBase) Delete(entity interface{}, name string) error
- func (s *DocumentSessionAttachmentsBase) DeleteByID(documentID string, name string) error
- func (s *DocumentSessionAttachmentsBase) GetNames(entity interface{}) ([]*AttachmentName, error)
- func (s *DocumentSessionAttachmentsBase) Store(entity interface{}, name string, stream io.Reader, contentType string) error
- func (s *DocumentSessionAttachmentsBase) StoreByID(documentID string, name string, stream io.Reader, contentType string) error
- type DocumentSessionRevisions
- func (r *DocumentSessionRevisions) Get(result interface{}, changeVector string) error
- func (r *DocumentSessionRevisions) GetFor(results interface{}, id string) error
- func (r *DocumentSessionRevisions) GetForPaged(results interface{}, id string, start int, pageSize int) error
- func (r *DocumentSessionRevisions) GetForStartAt(results interface{}, id string, start int) error
- func (r *DocumentSessionRevisions) GetMetadataFor(id string) ([]*MetadataAsDictionary, error)
- func (r *DocumentSessionRevisions) GetMetadataForPaged(id string, start int, pageSize int) ([]*MetadataAsDictionary, error)
- func (r *DocumentSessionRevisions) GetMetadataForStartAt(id string, start int) ([]*MetadataAsDictionary, error)
- func (r *DocumentSessionRevisions) GetRevisions(results interface{}, changeVectors []string) error
- type DocumentStore
- func (s *DocumentStore) AddAfterCloseListener(fn func(*DocumentStore)) int
- func (s *DocumentStore) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
- func (s *DocumentStore) AddBeforeCloseListener(fn func(*DocumentStore)) int
- func (s *DocumentStore) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
- func (s *DocumentStore) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
- func (s *DocumentStore) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
- func (s *DocumentStore) AggressivelyCache(database string) (CancelFunc, error)
- func (s *DocumentStore) AggressivelyCacheFor(cacheDuration time.Duration) (CancelFunc, error)
- func (s *DocumentStore) AggressivelyCacheForDatabase(cacheDuration time.Duration, database string) (CancelFunc, error)
- func (s *DocumentStore) BulkInsert(database string) *BulkInsertOperation
- func (s *DocumentStore) Changes(database string) *DatabaseChanges
- func (s *DocumentStore) Close()
- func (s *DocumentStore) DisableAggressiveCaching(databaseName string) *RestoreCaching
- func (s *DocumentStore) ExecuteIndex(task *IndexCreationTask, database string) error
- func (s *DocumentStore) ExecuteIndexes(tasks []*IndexCreationTask, database string) error
- func (s *DocumentStore) GetConventions() *DocumentConventions
- func (s *DocumentStore) GetDatabase() string
- func (s *DocumentStore) GetIdentifier() string
- func (s *DocumentStore) GetLastDatabaseChangesStateError(database string) error
- func (s *DocumentStore) GetRequestExecutor(database string) *RequestExecutor
- func (s *DocumentStore) GetUrls() []string
- func (s *DocumentStore) Initialize() error
- func (s *DocumentStore) Maintenance() *MaintenanceOperationExecutor
- func (s *DocumentStore) OpenSession(database string) (*DocumentSession, error)
- func (s *DocumentStore) OpenSessionWithOptions(options *SessionOptions) (*DocumentSession, error)
- func (s *DocumentStore) Operations() *OperationExecutor
- func (s *DocumentStore) RemoveAfterCloseListener(idx int)
- func (s *DocumentStore) RemoveAfterSaveChangesListener(handlerID int)
- func (s *DocumentStore) RemoveBeforeCloseListener(idx int)
- func (s *DocumentStore) RemoveBeforeDeleteListener(handlerID int)
- func (s *DocumentStore) RemoveBeforeQueryListener(handlerID int)
- func (s *DocumentStore) RemoveBeforeStoreListener(handlerID int)
- func (s *DocumentStore) SetConventions(conventions *DocumentConventions)
- func (s *DocumentStore) SetDatabase(database string)
- func (s *DocumentStore) SetIdentifier(identifier string)
- func (s *DocumentStore) SetUrls(urls []string)
- func (s *DocumentStore) Subscriptions() *DocumentSubscriptions
- type DocumentSubscriptions
- func (s *DocumentSubscriptions) Close() error
- func (s *DocumentSubscriptions) Create(options *SubscriptionCreationOptions, database string) (string, error)
- func (s *DocumentSubscriptions) CreateForRevisions(clazz reflect.Type, options *SubscriptionCreationOptions, database string) (string, error)
- func (s *DocumentSubscriptions) CreateForType(clazz reflect.Type, options *SubscriptionCreationOptions, database string) (string, error)
- func (s *DocumentSubscriptions) Delete(name string, database string) error
- func (s *DocumentSubscriptions) DropConnection(name string, database string) error
- func (s *DocumentSubscriptions) GetSubscriptionState(subscriptionName string, database string) (*SubscriptionState, error)
- func (s *DocumentSubscriptions) GetSubscriptionWorker(clazz reflect.Type, options *SubscriptionWorkerOptions, database string) (*SubscriptionWorker, error)
- func (s *DocumentSubscriptions) GetSubscriptionWorkerForRevisions(clazz reflect.Type, options *SubscriptionWorkerOptions, database string) (*SubscriptionWorker, error)
- func (s *DocumentSubscriptions) GetSubscriptions(start int, take int, database string) ([]*SubscriptionState, error)
- type DocumentsChanges
- type DropSubscriptionConnectionCommand
- type Duration
- type DynamicSpatialField
- type EagerSessionOperations
- type EnableIndexCommand
- type EnableIndexOperation
- type EventHandler
- type ExplainQueryCommand
- type ExplainQueryResult
- type ExternalReplication
- type Facet
- type FacetAggregation
- type FacetBase
- type FacetBaseCommon
- type FacetBuilder
- func (b *FacetBuilder) AllResults() *FacetBuilder
- func (b *FacetBuilder) AverageOn(path string) *FacetBuilder
- func (b *FacetBuilder) ByField(fieldName string) *FacetBuilder
- func (b *FacetBuilder) ByRanges(rng *RangeBuilder, ranges ...*RangeBuilder) *FacetBuilder
- func (b *FacetBuilder) GetFacet() FacetBase
- func (b *FacetBuilder) MaxOn(path string) *FacetBuilder
- func (b *FacetBuilder) MinOn(path string) *FacetBuilder
- func (b *FacetBuilder) SumOn(path string) *FacetBuilder
- func (b *FacetBuilder) WithDisplayName(displayName string) *FacetBuilder
- func (b *FacetBuilder) WithOptions(options *FacetOptions) *FacetBuilder
- type FacetOptions
- type FacetResult
- type FacetSetup
- type FacetTermSortMode
- type FacetValue
- type FieldIndexing
- type FieldStorage
- type FieldTermVector
- type GenericQueryResult
- type GenericRangeFacet
- type GetAttachmentCommand
- type GetAttachmentOperation
- type GetClientConfigurationCommand
- type GetClientConfigurationCommandResult
- type GetClientConfigurationOperation
- type GetCollectionStatisticsCommand
- type GetCollectionStatisticsOperation
- type GetCompareExchangeValueCommand
- type GetCompareExchangeValueOperation
- type GetCompareExchangeValuesCommand
- type GetCompareExchangeValuesOperation
- type GetConflictsCommand
- type GetConflictsResult
- type GetDatabaseNamesCommand
- type GetDatabaseNamesOperation
- type GetDatabaseNamesResult
- type GetDatabaseRecordCommand
- type GetDatabaseRecordOperation
- type GetDatabaseTopologyCommand
- type GetDocumentsCommand
- type GetDocumentsResult
- type GetIdentitiesCommand
- type GetIdentitiesOperation
- type GetIndexCommand
- type GetIndexErrorsCommand
- type GetIndexErrorsOperation
- type GetIndexNamesCommand
- type GetIndexNamesOperation
- type GetIndexOperation
- type GetIndexStatisticsCommand
- type GetIndexStatisticsOperation
- type GetIndexesCommand
- type GetIndexesOperation
- type GetIndexesStatisticsCommand
- type GetIndexesStatisticsOperation
- type GetIndexingStatusCommand
- type GetIndexingStatusOperation
- type GetNextOperationIDCommand
- type GetOperationStateCommand
- type GetOperationStateOperation
- type GetResponse
- type GetRevisionOperation
- func (o *GetRevisionOperation) GetRevision(result interface{}) error
- func (o *GetRevisionOperation) GetRevisionWithDocument(result interface{}, document map[string]interface{}) error
- func (o *GetRevisionOperation) GetRevisions(results interface{}) error
- func (o *GetRevisionOperation) GetRevisionsFor(results interface{}) error
- func (o *GetRevisionOperation) GetRevisionsMetadataFor() []*MetadataAsDictionary
- type GetRevisionsBinEntryCommand
- type GetRevisionsCommand
- type GetServerWideOperationStateCommand
- type GetServerWideOperationStateOperation
- type GetStatisticsCommand
- type GetStatisticsOperation
- type GetSubscriptionStateCommand
- type GetSubscriptionsCommand
- type GetSubscriptionsResult
- type GetTcpInfoCommand
- type GetTermsCommand
- type GetTermsOperation
- type GroupBy
- type GroupByDocumentQuery
- func (q *GroupByDocumentQuery) SelectCount() *DocumentQuery
- func (q *GroupByDocumentQuery) SelectCountWithName(projectedName string) *DocumentQuery
- func (q *GroupByDocumentQuery) SelectKey() *GroupByDocumentQuery
- func (q *GroupByDocumentQuery) SelectKeyWithName(fieldName string) *GroupByDocumentQuery
- func (q *GroupByDocumentQuery) SelectKeyWithNameAndProjectedName(fieldName string, projectedName string) *GroupByDocumentQuery
- func (q *GroupByDocumentQuery) SelectSum(field *GroupByField, fields ...*GroupByField) *DocumentQuery
- type GroupByField
- type GroupByMethod
- type HashCalculator
- type HeadAttachmentCommand
- type HeadDocumentCommand
- func (c *HeadDocumentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
- func (c *HeadDocumentCommand) Exists() bool
- func (c *HeadDocumentCommand) ProcessResponse(cache *httpCache, response *http.Response, url string) (responseDisposeHandling, error)
- func (c *HeadDocumentCommand) SetResponse(response []byte, fromCache bool) error
- type HiLoIDGenerator
- type HiLoResult
- type HiLoReturnCommand
- type ICommandData
- type ICompareExchangeValue
- type IContent
- type ILazyOperation
- type IMaintenanceOperation
- type IMoreLikeThisBuilderBase
- type IMoreLikeThisBuilderForDocumentQuery
- type IMoreLikeThisOperations
- type IOperation
- type IRaftCommand
- type IServerOperation
- type IVoidMaintenanceOperation
- type IllegalArgumentError
- type IllegalStateError
- type InMemoryDocumentSessionOperations
- func (s *InMemoryDocumentSessionOperations) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
- func (s *InMemoryDocumentSessionOperations) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
- func (s *InMemoryDocumentSessionOperations) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
- func (s *InMemoryDocumentSessionOperations) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
- func (s *InMemoryDocumentSessionOperations) Clear()
- func (s *InMemoryDocumentSessionOperations) Close()
- func (s *InMemoryDocumentSessionOperations) Defer(commands ...ICommandData)
- func (s *InMemoryDocumentSessionOperations) Delete(entity interface{}) error
- func (s *InMemoryDocumentSessionOperations) DeleteByID(id string, expectedChangeVector string) error
- func (s *InMemoryDocumentSessionOperations) Evict(entity interface{}) error
- func (s *InMemoryDocumentSessionOperations) GenerateID(entity interface{}) (string, error)
- func (s *InMemoryDocumentSessionOperations) GetChangeVectorFor(instance interface{}) (*string, error)
- func (s *InMemoryDocumentSessionOperations) GetClusterSession() (*ClusterTransactionOperations, error)
- func (s *InMemoryDocumentSessionOperations) GetConventions() *DocumentConventions
- func (s *InMemoryDocumentSessionOperations) GetCurrentSessionNode() (*ServerNode, error)
- func (s *InMemoryDocumentSessionOperations) GetDeferredCommandsCount() int
- func (s *InMemoryDocumentSessionOperations) GetDocumentID(instance interface{}) string
- func (s *InMemoryDocumentSessionOperations) GetDocumentStore() *DocumentStore
- func (s *InMemoryDocumentSessionOperations) GetLastModifiedFor(instance interface{}) (*time.Time, error)
- func (s *InMemoryDocumentSessionOperations) GetMetadataFor(instance interface{}) (*MetadataAsDictionary, error)
- func (s *InMemoryDocumentSessionOperations) GetNumberOfEntitiesInUnitOfWork() int
- func (s *InMemoryDocumentSessionOperations) GetNumberOfRequests() int
- func (s *InMemoryDocumentSessionOperations) GetOperations() *OperationExecutor
- func (s *InMemoryDocumentSessionOperations) GetRequestExecutor() *RequestExecutor
- func (s *InMemoryDocumentSessionOperations) HasChanged(entity interface{}) (bool, error)
- func (s *InMemoryDocumentSessionOperations) HasChanges() bool
- func (s *InMemoryDocumentSessionOperations) IgnoreChangesFor(entity interface{}) error
- func (s *InMemoryDocumentSessionOperations) IsDeleted(id string) bool
- func (s *InMemoryDocumentSessionOperations) IsLoaded(id string) bool
- func (s *InMemoryDocumentSessionOperations) IsLoadedOrDeleted(id string) bool
- func (s *InMemoryDocumentSessionOperations) NoTracking(mode bool)
- func (s *InMemoryDocumentSessionOperations) RemoveAfterSaveChangesListener(handlerID int)
- func (s *InMemoryDocumentSessionOperations) RemoveBeforeDeleteListener(handlerID int)
- func (s *InMemoryDocumentSessionOperations) RemoveBeforeQueryListener(handlerID int)
- func (s *InMemoryDocumentSessionOperations) RemoveBeforeStoreListener(handlerID int)
- func (s *InMemoryDocumentSessionOperations) Store(entity interface{}) error
- func (s *InMemoryDocumentSessionOperations) StoreWithChangeVectorAndID(entity interface{}, changeVector string, id string) error
- func (s *InMemoryDocumentSessionOperations) StoreWithID(entity interface{}, id string) error
- func (s *InMemoryDocumentSessionOperations) TrackEntity(result interface{}, id string, document map[string]interface{}, ...) error
- func (s *InMemoryDocumentSessionOperations) TrackEntityInDocumentInfo(result interface{}, documentFound *documentInfo) error
- func (s *InMemoryDocumentSessionOperations) UpdateMetadataModifications(documentInfo *documentInfo) bool
- func (s *InMemoryDocumentSessionOperations) UpdateMetadataModificationsTemp(metadataInstance *MetadataAsDictionary, metadata map[string]interface{}) bool
- func (s *InMemoryDocumentSessionOperations) WaitForIndexesAfterSaveChanges(options func(*IndexesWaitOptsBuilder))
- func (s *InMemoryDocumentSessionOperations) WaitForReplicationAfterSaveChanges(options func(*ReplicationWaitOptsBuilder))
- func (s *InMemoryDocumentSessionOperations) WhatChanged() (map[string][]*DocumentsChanges, error)
- type IndexAlreadyExistError
- type IndexChange
- type IndexChangeTypes
- type IndexCompilationError
- type IndexConfiguration
- type IndexCreationError
- type IndexCreationTask
- func (t *IndexCreationTask) Analyze(field string, analyzer string)
- func (t *IndexCreationTask) CreateIndexDefinition() *IndexDefinition
- func (t *IndexCreationTask) Execute(store *DocumentStore, conventions *DocumentConventions, database string) error
- func (t *IndexCreationTask) Index(field string, indexing FieldIndexing)
- func (t *IndexCreationTask) IsMapReduce() bool
- func (t *IndexCreationTask) Spatial(field string, indexing func() *SpatialOptions)
- func (t *IndexCreationTask) Store(field string, storage FieldStorage)
- func (t *IndexCreationTask) StoreAllFields(storage FieldStorage)
- func (t *IndexCreationTask) Suggestion(field string)
- func (t *IndexCreationTask) TermVector(field string, termVector FieldTermVector)
- type IndexDefinition
- func (d *IndexDefinition) GetAdditionalSources() map[string]string
- func (d *IndexDefinition) GetConfiguration() IndexConfiguration
- func (d *IndexDefinition) GetFields() map[string]*IndexFieldOptions
- func (d *IndexDefinition) GetOutputReduceToCollection() *string
- func (d *IndexDefinition) GetType() IndexType
- func (d *IndexDefinition) SetAdditionalSources(additionalSources map[string]string)
- func (d *IndexDefinition) SetConfiguration(configuration IndexConfiguration)
- func (d *IndexDefinition) SetOutputReduceToCollection(outputReduceToCollection string)
- func (d *IndexDefinition) SetType(indexType IndexType)
- func (d *IndexDefinition) String() string
- type IndexDefinitionBuilder
- type IndexDeletionError
- type IndexDoesNotExistError
- type IndexErrors
- type IndexFieldOptions
- type IndexHasChangedCommand
- type IndexHasChangedOperation
- type IndexInformation
- type IndexInvalidError
- type IndexLockMode
- type IndexPriority
- type IndexQuery
- type IndexQueryContent
- type IndexRunningStatus
- type IndexState
- type IndexStats
- type IndexStatus
- type IndexType
- type IndexesWaitOptsBuilder
- type IndexingError
- type IndexingStatus
- type InvalidQueryError
- type JSONArrayResult
- type JavaScriptArray
- type JavaScriptError
- type KillOperationCommand
- type Lazy
- type LazyAggregationQueryOperation
- type LazyLoadOperation
- type LazyMultiLoaderWithInclude
- type LazyQueryOperation
- type LazySessionOperations
- func (o *LazySessionOperations) Include(path string) *LazyMultiLoaderWithInclude
- func (o *LazySessionOperations) Load(id string) (*Lazy, error)
- func (o *LazySessionOperations) LoadMulti(ids []string) (*Lazy, error)
- func (o *LazySessionOperations) LoadMultiWithEval(ids []string, onEval func(), onEvalResult interface{}) (*Lazy, error)
- func (o *LazySessionOperations) LoadStartingWith(args *StartsWithArgs) *Lazy
- func (o *LazySessionOperations) LoadWithEval(id string, onEval func(), onEvalResult interface{}) (*Lazy, error)
- type LazyStartsWithOperation
- type LazySuggestionQueryOperation
- type LeaderStamp
- type LicenseActivationError
- type LoadOperation
- type LoadStartingWithOperation
- type MaintenanceOperationExecutor
- func (e *MaintenanceOperationExecutor) ForDatabase(databaseName string) *MaintenanceOperationExecutor
- func (e *MaintenanceOperationExecutor) GetRequestExecutor() *RequestExecutor
- func (e *MaintenanceOperationExecutor) Send(operation IMaintenanceOperation) error
- func (e *MaintenanceOperationExecutor) SendAsync(operation IMaintenanceOperation) (*Operation, error)
- func (e *MaintenanceOperationExecutor) Server() *ServerOperationExecutor
- type MetadataAsDictionary
- func NewMetadataAsDictionary(metadata map[string]interface{}, parent *MetadataAsDictionary, ...) *MetadataAsDictionary
- func NewMetadataAsDictionaryWithMetadata(metadata map[string]interface{}) *MetadataAsDictionary
- func NewMetadataAsDictionaryWithSource(metadata map[string]interface{}) *MetadataAsDictionary
- func (d *MetadataAsDictionary) Clear()
- func (d *MetadataAsDictionary) ContainsKey(key string) bool
- func (d *MetadataAsDictionary) ConvertValue(key string, value interface{}) interface{}
- func (d *MetadataAsDictionary) EntrySet() map[string]interface{}
- func (d *MetadataAsDictionary) Get(key string) (interface{}, bool)
- func (d *MetadataAsDictionary) GetObjects(key string) []*MetadataAsDictionary
- func (d *MetadataAsDictionary) Init()
- func (d *MetadataAsDictionary) IsDirty() bool
- func (d *MetadataAsDictionary) IsEmpty() bool
- func (d *MetadataAsDictionary) KeySet() []string
- func (d *MetadataAsDictionary) MarkDirty()
- func (d *MetadataAsDictionary) Put(key string, value interface{}) interface{}
- func (d *MetadataAsDictionary) Remove(key string)
- func (d *MetadataAsDictionary) Size() int
- type MethodCall
- type MethodCallData
- type MethodsType
- type ModifyOngoingTaskResult
- type MoreLikeThisBase
- type MoreLikeThisBuilder
- func (b *MoreLikeThisBuilder) GetMoreLikeThis() MoreLikeThisBase
- func (b *MoreLikeThisBuilder) UsingAnyDocument() IMoreLikeThisOperations
- func (b *MoreLikeThisBuilder) UsingDocument(documentJSON string) IMoreLikeThisOperations
- func (b *MoreLikeThisBuilder) UsingDocumentWithBuilder(builder func(*DocumentQuery)) IMoreLikeThisOperations
- func (b *MoreLikeThisBuilder) WithOptions(options *MoreLikeThisOptions) IMoreLikeThisOperations
- type MoreLikeThisCommon
- type MoreLikeThisOptions
- func (o *MoreLikeThisOptions) SetBoost(boost bool)
- func (o *MoreLikeThisOptions) SetBoostFactor(boostFactor float32)
- func (o *MoreLikeThisOptions) SetMaximumDocumentFrequency(maximumDocumentFrequency int)
- func (o *MoreLikeThisOptions) SetMaximumDocumentFrequencyPercentage(maximumDocumentFrequencyPercentage int)
- func (o *MoreLikeThisOptions) SetMaximumNumberOfTokensParsed(maximumNumberOfTokensParsed int)
- func (o *MoreLikeThisOptions) SetMaximumQueryTerms(maximumQueryTerms int)
- func (o *MoreLikeThisOptions) SetMaximumWordLength(maximumWordLength int)
- func (o *MoreLikeThisOptions) SetMinimumDocumentFrequency(minimumDocumentFrequency int)
- func (o *MoreLikeThisOptions) SetMinimumTermFrequency(minimumTermFrequency int)
- func (o *MoreLikeThisOptions) SetMinimumWordLength(minimumWordLength int)
- func (o *MoreLikeThisOptions) SetStopWordsDocumentID(stopWordsDocumentID string)
- type MoreLikeThisQueryResult
- type MoreLikeThisStopWords
- type MoreLikeThisUsingAnyDocument
- type MoreLikeThisUsingDocument
- type MoreLikeThisUsingDocumentForDocumentQuery
- type MultiDatabaseHiLoIDGenerator
- type MultiGetCommand
- type MultiGetOperation
- type MultiLoaderWithInclude
- type MultiTypeHiLoIDGenerator
- type NextHiLoCommand
- type NextIdentityForCommand
- type NoLeaderError
- type NodeID
- type NodeIsPassiveError
- type NodeSelector
- type NodeSelectorState
- type NodeStatus
- type NonUniqueObjectError
- type NotImplementedError
- type Operation
- type OperationCancelledError
- type OperationExceptionResult
- type OperationExecutor
- func (e *OperationExecutor) ForDatabase(databaseName string) *OperationExecutor
- func (e *OperationExecutor) Send(operation IOperation, sessionInfo *SessionInfo) error
- func (e *OperationExecutor) SendAsync(operation IOperation, sessionInfo *SessionInfo) (*Operation, error)
- func (e *OperationExecutor) SendPatchOperation(operation *PatchOperation, sessionInfo *SessionInfo) (*PatchOperationResult, error)
- type OperationIDResult
- type OperationStatusChange
- type OrderingType
- type Parameters
- type PatchByQueryCommand
- type PatchByQueryOperation
- type PatchCommand
- type PatchCommandData
- type PatchOperation
- type PatchOperationPayload
- type PatchOperationResult
- type PatchRequest
- type PatchResult
- type PatchStatus
- type PointField
- type PutAttachmentCommand
- type PutAttachmentCommandData
- type PutAttachmentOperation
- type PutClientConfigurationCommand
- type PutClientConfigurationOperation
- type PutCommandDataWithJSON
- type PutCompareExchangeCommandData
- type PutCompareExchangeValueCommand
- type PutCompareExchangeValueOperation
- type PutConnectionStringCommand
- type PutConnectionStringOperation
- type PutConnectionStringResult
- type PutDocumentCommand
- type PutIndexResult
- type PutIndexesCommand
- type PutIndexesOperation
- type PutIndexesResponse
- type PutResult
- type QueryCommand
- type QueryData
- type QueryOperationOptions
- type QueryOperator
- type QueryResult
- type QueryStatistics
- type QueryStreamCommand
- type RaftCommandBase
- type RangeBuilder
- func (b *RangeBuilder) Err() error
- func (b *RangeBuilder) GetStringRepresentation(addQueryParameter func(interface{}) string) (string, error)
- func (b *RangeBuilder) IsGreaterThan(value interface{}) *RangeBuilder
- func (b *RangeBuilder) IsGreaterThanOrEqualTo(value interface{}) *RangeBuilder
- func (b *RangeBuilder) IsLessThan(value interface{}) *RangeBuilder
- func (b *RangeBuilder) IsLessThanOrEqualTo(value interface{}) *RangeBuilder
- type RangeFacet
- type RangeValue
- type RavenCommand
- type RavenCommandBase
- func (c *RavenCommandBase) CreateRequest(node *ServerNode) (*http.Request, error)
- func (c *RavenCommandBase) GetBase() *RavenCommandBase
- func (c *RavenCommandBase) Send(client *http.Client, req *http.Request) (*http.Response, error)
- func (c *RavenCommandBase) SetResponse(response []byte, fromCache bool) error
- func (c *RavenCommandBase) SetResponseRaw(response *http.Response, stream io.Reader) error
- type RavenCommandResponseType
- type RavenConnectionString
- type RavenError
- type RawDocumentQuery
- func (q *RawDocumentQuery) AddAfterQueryExecutedListener(action func(*QueryResult)) int
- func (q *RawDocumentQuery) AddAfterStreamExecutedListener(action func(map[string]interface{})) int
- func (q *RawDocumentQuery) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
- func (q *RawDocumentQuery) AddParameter(name string, value interface{}) *RawDocumentQuery
- func (q RawDocumentQuery) Any() (bool, error)
- func (q RawDocumentQuery) Count() (int, error)
- func (q RawDocumentQuery) CountLazily() (*Lazy, error)
- func (q RawDocumentQuery) Err() error
- func (q RawDocumentQuery) First(result interface{}) error
- func (q RawDocumentQuery) GetIndexQuery() (*IndexQuery, error)
- func (q RawDocumentQuery) GetResults(results interface{}) error
- func (q RawDocumentQuery) Lazily() (*Lazy, error)
- func (q *RawDocumentQuery) NoCaching() *RawDocumentQuery
- func (q *RawDocumentQuery) NoTracking() *RawDocumentQuery
- func (q *RawDocumentQuery) RemoveAfterQueryExecutedListener(idx int) *RawDocumentQuery
- func (q *RawDocumentQuery) RemoveAfterStreamExecutedListener(idx int) *RawDocumentQuery
- func (q *RawDocumentQuery) RemoveBeforeQueryExecutedListener(idx int) *RawDocumentQuery
- func (q RawDocumentQuery) Single(result interface{}) error
- func (q *RawDocumentQuery) Skip(count int) *RawDocumentQuery
- func (q *RawDocumentQuery) Statistics(stats **QueryStatistics) *RawDocumentQuery
- func (q *RawDocumentQuery) Take(count int) *RawDocumentQuery
- func (q *RawDocumentQuery) UsingDefaultOperator(queryOperator QueryOperator) *RawDocumentQuery
- func (q *RawDocumentQuery) WaitForNonStaleResults() *RawDocumentQuery
- func (q *RawDocumentQuery) WaitForNonStaleResultsWithTimeout(waitTimeout time.Duration) *RawDocumentQuery
- type ReadBalanceBehavior
- type RemoveCompareExchangeValueCommand
- type ReplicationNode
- type ReplicationWaitOptsBuilder
- func (b *ReplicationWaitOptsBuilder) Majority(waitForMajority bool) *ReplicationWaitOptsBuilder
- func (b *ReplicationWaitOptsBuilder) NumberOfReplicas(replicas int) *ReplicationWaitOptsBuilder
- func (b *ReplicationWaitOptsBuilder) ThrowOnTimeout(shouldThrow bool) *ReplicationWaitOptsBuilder
- func (b *ReplicationWaitOptsBuilder) WithTimeout(timeout time.Duration) *ReplicationWaitOptsBuilder
- type RequestExecutor
- func ClusterRequestExecutorCreate(initialUrls []string, certificate *tls.Certificate, ...) *RequestExecutor
- func ClusterRequestExecutorCreateForSingleNode(url string, certificate *tls.Certificate, trustStore *x509.Certificate, ...) *RequestExecutor
- func NewClusterRequestExecutor(certificate *tls.Certificate, trustStore *x509.Certificate, ...) *RequestExecutor
- func NewRequestExecutor(databaseName string, certificate *tls.Certificate, ...) *RequestExecutor
- func RequestExecutorCreate(initialUrls []string, databaseName string, certificate *tls.Certificate, ...) *RequestExecutor
- func RequestExecutorCreateForSingleNodeWithConfigurationUpdates(url string, databaseName string, certificate *tls.Certificate, ...) *RequestExecutor
- func RequestExecutorCreateForSingleNodeWithoutConfigurationUpdates(url string, databaseName string, certificate *tls.Certificate, ...) *RequestExecutor
- func (re *RequestExecutor) Close()
- func (re *RequestExecutor) Execute(chosenNode *ServerNode, nodeIndex int, command RavenCommand, shouldRetry bool, ...) error
- func (re *RequestExecutor) ExecuteCommand(command RavenCommand, sessionInfo *SessionInfo) error
- func (re *RequestExecutor) GetConventions() *DocumentConventions
- func (re *RequestExecutor) GetHTTPClient() (*http.Client, error)
- func (re *RequestExecutor) GetTopology() *Topology
- func (re *RequestExecutor) GetTopologyNodes() []*ServerNode
- func (re *RequestExecutor) GetURL() (string, error)
- func (re *RequestExecutor) MakeCluster()
- func (re *RequestExecutor) UpdateTopologyAsync(node *ServerNode, timeout int) chan *clusterUpdateAsyncResult
- type ResetIndexCommand
- type ResetIndexOperation
- type ResponseTimeInformation
- type ResponseTimeItem
- type RestoreCaching
- type Revision
- type RevisionsCollectionConfiguration
- type RevisionsConfiguration
- type RevisionsDisabledError
- type RevisionsSessionOperations
- type RouteNotFoundError
- type RuntimeError
- type ScriptResolver
- type SearchOperator
- type SecurityError
- type SeedIdentityForCommand
- type Semaphore
- type ServerLoadFailureError
- type ServerNode
- type ServerOperationExecutor
- type SessionCreatedEventArgs
- type SessionInfo
- type SessionOptions
- type SetIndexesLockCommand
- type SetIndexesLockOperation
- type SetIndexesLockParameters
- type SetIndexesPriorityCommand
- type SetIndexesPriorityOperation
- type SetIndexesPriorityParameters
- type Size
- type SpatialBounds
- type SpatialCriteria
- type SpatialCriteriaCommon
- type SpatialCriteriaFactory
- func (f *SpatialCriteriaFactory) Contains(shapeWkt string) *WktCriteria
- func (f *SpatialCriteriaFactory) ContainsWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
- func (f *SpatialCriteriaFactory) Disjoint(shapeWkt string) *WktCriteria
- func (f *SpatialCriteriaFactory) DisjointWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
- func (f *SpatialCriteriaFactory) Intersects(shapeWkt string) *WktCriteria
- func (f *SpatialCriteriaFactory) IntersectsWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
- func (f *SpatialCriteriaFactory) RelatesToShape(shapeWkt string, relation SpatialRelation) *WktCriteria
- func (f *SpatialCriteriaFactory) RelatesToShapeWithError(shapeWkt string, relation SpatialRelation, distErrorPercent float64) *WktCriteria
- func (f *SpatialCriteriaFactory) Within(shapeWkt string) *WktCriteria
- func (f *SpatialCriteriaFactory) WithinRadius(radius float64, latitude float64, longitude float64) *CircleCriteria
- func (f *SpatialCriteriaFactory) WithinRadiusWithUnits(radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits) *CircleCriteria
- func (f *SpatialCriteriaFactory) WithinRadiusWithUnitsAndError(radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits, ...) *CircleCriteria
- func (f *SpatialCriteriaFactory) WithinWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
- type SpatialFieldType
- type SpatialOptions
- func NewCartesianBoundingBoxIndex() *SpatialOptions
- func NewCartesianQuadPrefixTreeIndex(maxTreeLevel int, bounds *SpatialBounds) *SpatialOptions
- func NewGeographyBoundingBoxIndexWithRadius(circleRadiusUnits SpatialUnits) *SpatialOptions
- func NewGeographyDefaultOptions() *SpatialOptions
- func NewGeographyDefaultOptionsWithRadius(circleRadiusUnits SpatialUnits) *SpatialOptions
- func NewGeographyGeohashPrefixTreeIndex(maxTreeLevel int) *SpatialOptions
- func NewGeographyGeohashPrefixTreeIndexWithRadius(maxTreeLevel int, circleRadiusUnits SpatialUnits) *SpatialOptions
- func NewGeographyQuadPrefixTreeIndex(maxTreeLevel int) *SpatialOptions
- func NewGeographyQuadPrefixTreeIndexWithRadius(maxTreeLevel int, circleRadiusUnits SpatialUnits) *SpatialOptions
- func NewGeograpyboundingBoxIndex() *SpatialOptions
- func NewSpatialOptions() *SpatialOptions
- type SpatialRelation
- type SpatialSearchStrategy
- type SpatialUnits
- type StartIndexCommand
- type StartIndexOperation
- type StartIndexingCommand
- type StartIndexingOperation
- type StartsWithArgs
- type StopIndexCommand
- type StopIndexOperation
- type StopIndexingCommand
- type StopIndexingOperation
- type StreamCommand
- type StreamIterator
- type StreamOperation
- type StreamQueryStatistics
- type StreamResult
- type StreamResultResponse
- type StringDistanceTypes
- type SubscriberErrorError
- type SubscriptionBatch
- type SubscriptionBatchItem
- type SubscriptionChangeVectorUpdateConcurrencyError
- type SubscriptionClientMessageType
- type SubscriptionClosedError
- type SubscriptionConnectionClientMessage
- type SubscriptionCreationOptions
- type SubscriptionDoesNotBelongToNodeError
- type SubscriptionDoesNotExistError
- type SubscriptionError
- type SubscriptionInUseError
- type SubscriptionInvalidStateError
- type SubscriptionOpeningStrategy
- type SubscriptionState
- type SubscriptionStateWithNodeDetails
- type SubscriptionTryout
- type SubscriptionWorker
- func (w *SubscriptionWorker) AddAfterAcknowledgmentListener(handler func(*SubscriptionBatch)) int
- func (w *SubscriptionWorker) AddOnSubscriptionConnectionRetry(handler func(error)) int
- func (w *SubscriptionWorker) Cancel()
- func (w *SubscriptionWorker) Close() error
- func (w *SubscriptionWorker) Err() error
- func (w *SubscriptionWorker) IsDone() bool
- func (w *SubscriptionWorker) RemoveAfterAcknowledgmentListener(id int)
- func (w *SubscriptionWorker) RemoveOnSubscriptionConnectionRetry(id int)
- func (w *SubscriptionWorker) Run(cb func(*SubscriptionBatch) error) error
- func (w *SubscriptionWorker) WaitUntilFinished(timeout time.Duration) error
- type SubscriptionWorkerOptions
- type SuggestionBase
- type SuggestionBuilder
- type SuggestionCommon
- type SuggestionDocumentQuery
- type SuggestionOptions
- type SuggestionResult
- type SuggestionSortMode
- type SuggestionWithTerm
- type SuggestionWithTerms
- type TcpConnectionInfo
- type TermsQueryResult
- type Time
- type TimeoutError
- type Topology
- type TransactionMode
- type UUID
- type UnsuccessfulRequestError
- type UnsupportedOperationError
- type UpdateExternalReplicationCommand
- type UpdateExternalReplicationOperation
- type WktCriteria
- type WktField
Constants ¶
const ( AttachmentDocument = "Document" AttachmentRevision = "Revision" )
const ( //CommandNone = "NONE" CommandPut = "PUT" CommandPatch = "PATCH" CommandDelete = "DELETE" CommandAttachmentPut = "ATTACHMENT_PUT" CommandAttachmentDelete = "ATTACHMENT_DELETE" CommandClientAnyCommand = "CLIENT_ANY_COMMAND" CommandClientNotAttachment = "CLIENT_NOT_ATTACHMENT" CompareExchangePut = "COMPARE_EXCHANGE_PUT" CompareExchangeDelete = "COMPARE_EXCHANGE_DELETE" )
Note: this is enum in Java but those are serialized to json as strings so making them strings is better in Go
const ( ConnectionStringTypeNone = "None" ConnectionStringTypeRaven = "Raven" ConnectionStringTypeSQL = "Sql" )
const ( // Name of struct field that represents identity property IdentityProperty = "ID" MetadataCollection = "@collection" MetadataProjection = "@projection" MetadataKey = "@metadata" MetadataID = "@id" MetadataConflict = "@conflict" MetadataIDProperty = "Id" MetadataFlags = "@flags" MetadataAttachments = "@attachments" MetadataInddexScore = "@index-score" MetadataLastModified = "@last-modified" MetadataRavenGoType = "Raven-Go-Type" MetadataChangeVector = "@change-vector" MetadataExpires = "@expires" MetadataAllDocumentsCollection = "@all_docs" IndexingSideBySideIndexNamePrefix = "ReplacementOf/" IndexingFieldNameDocumentID = "id()" IndexingFieldNameReduceKeyHash = "hash(key())" IndexingFieldNameReduceKeyValue = "key()" IndexingFieldAllFields = "__all_fields" //TBD CUSTOM_SORT_FIELD_NAME = "__customSort"; IndexingSpatialDefaultDistnaceErrorPct = 0.025 TransactionMode_SingleNode = 0 TransactionMode_ClusterWide = 1 )
const ( DatabasePromotionStatusWaitingForFirstPromotion = "WaitingForFirstPromotion" DatabasePromotionStatusNotResponding = "NotResponding" DatabasePromotionStatusIndexNotUpToDate = "IndexNotUpToDate" DatabasePromotionStatusChangeVectorNotMerged = "ChangeVectorNotMerged" DatabasePromotionStatusWaitingForResponse = "WaitingForResponse" DatabasePromotionStatusOk = "Ok" )
const ( DocumentChangeNone = "None" DocumentChangePut = "Put" DocumentChangeDelete = "Delete" DocumentChangeConflict = "Conflict" DocumentChangeCommon = "Common" )
const ( FacetAggregationNone = "None" FacetAggregationMax = "Max" FacetAggregationMin = "Min" FacetAggregationAverage = "Average" FacetAggregationSum = "Sum" )
const ( FacetTermSortModeValueAsc = "ValueAsc" FacetTermSortModeValueDesc = "ValueDesc" FacetTermSortModeCountAsc = "CountAsc" FacetTermSortModeCountDesc = "CountDesc" )
const ( FieldIndexingNo = "No" FieldIndexingSearch = "Search" FieldIndexingExact = "Exact" FieldIndexingDefault = "Default" )
const ( FieldStorageYes = "Yes" FieldStorageNo = "No" )
const ( FieldTermVectorNo = "No" FieldTermVectorYes = "Yes" FieldTermVectorWithPositions = "WithPositions" FieldTermVectorWithOffsets = "WithOffsets" FieldTermVectorWithPositionsAndOffsets = "WithPositionsAndOffsets" )
const ( GroupByMethodNone = "None" GroupByMethodArray = "Array" )
const ( IndexChangeNone = "None" IndexChangeBatchCompleted = "BatchCompleted" IndexChangeIndexAdded = "IndexAdded" IndexChangeIndexRemoved = "IndexRemoved" IndexChangeIndexDemotedToIdle = "IndexDemotedToIdle" IndexChangeIndexPromotedFromIdle = "IndexPromotedFromIdle" IndexChangeIndexDemotedToDisabled = "IndexDemotedToDisabled" IndexChangeIndexMarkedAsErrored = "IndexMarkedAsErrored" IndexChangeSideBySideReplace = "SideBySideReplace" IndexChangeRenamed = "Renamed" IndexChangeIndexPaused = "IndexPaused" IndexChangeLockModeChanged = "LockModeChanged" IndexChangePriorityChanged = "PriorityChanged" )
const ( IndexLockModeUnlock = "Unlock" IndexLockModeLockedIgnore = "LockedIgnore" IndexLockModeLockedError = "LockedError" )
const ( IndexPriorityLow = "Low" IndexPriorityNormal = "Normal" IndexPriorityHigh = "High" )
const ( IndexRunningStatusRunning = "Running" IndexRunningStatusPaused = "Paused" IndexRunningStatusDisabled = "Disabled" )
const ( IndexStateNormal = "Normal" IndexStateDisabled = "Disabled" IndexStateIdle = "Idle" IndexStateError = "Error" )
const ( IndexTypeNone = "None" IndexTypeAutoMap = "AutoMap" IndexTypeAutoMapReduce = "AutoMapReduce" IndexTypeMap = "Map" IndexTypeMapReduce = "MapReduce" IndexTypeFaulty = "Faulty" )
const ( MoreLikeThisOptionsDefaultMaximumNumberOfTokensParsed = 5000 MoreLikeThisOptionsDefaultMinimumTermFrequency = 2 MoreLikeThisOptionsDefaultMinimumDocumentFrequency = 5 MoreLikeThisOptionsDefaultMaximumDocumentFrequence = math.MaxInt32 MoreLikeThisOptionsDefaultBoost = false MoreLikeThisOptionsDefaultBoostFactor = 1 MoreLikeThisOptionsDefaultMinimumWordLength = 0 MoreLikeThisOptionsDefaultMaximumWordLength = 0 MoreLikeThisOptionsDefaultMaximumQueryTerms = 25 )
const ( OrderingTypeString = "STRING" OrderingTypeLong = "LONG" OrderingTypeDouble = "DOUBLE" OrderingTypeAlphaNumeric = "ALPHA_NUMERIC" )
const ( PatchStatusDocumentDoesNotExist = "DocumentDoesNotExist" PatchStatusCreated = "Created" PatchStatusPatched = "Patched" PatchStatusSkipped = "Skipped" PatchStatusNotModified = "NotModified" )
const ( QueryOperatorAnd = "And" QueryOperatorOr = "Or" )
const ( RavenCommandResponseTypeEmpty = "EMPTY" RavenCommandResponseTypeObject = "OBJECT" RavenCommandResponseTypeRaw = "RAW" )
const ( ReadBalanceBehaviorNone = "None" ReadBalanceBehaviorRoundRobin = "RoundRobin" ReadBalanceBehaviorFastestNode = "FastestNode" )
const ( ServerNodeRoleNone = "None" ServerNodeRolePromotable = "Promotable" ServerNodeRoleMember = "Member" ServerNodeRoleRehab = "Rehab" )
const ( SpatialFieldGeography = "Geography" SpatialFieldCartesian = "Cartesian" )
const ( //about 4.78 meters at equator, should be good enough (see: http://unterbahn.com/2009/11/metric-dimensions-of-geohash-partitions-at-the-equator/) SpatialOptionsDefaultGeohashLevel = 9 //about 4.78 meters at equator, should be good enough SpatialOptionsDefaultQuadTreeLevel = 23 )
const ( SpatialRelationWithin = "Within" SpatialRelationContains = "Contains" SpatialRelationDisjoin = "Disjoint" SpatialRelationIntersects = "Intersects" )
const ( SpatialSearchStrategyGeohashPrefixTree = "GeohashPrefixTree" SpatialSearchStrategyQuadPrefixTree = "QuadPrefixTree" SpatialSearchStrategyBoundingBox = "BoundingBox" )
const ( SpatialUnitsKilometers = "Kilometers" SpatialUnitsMiles = "Miles" )
const ( StringDistanceNone = "None" StringDistanceDefault = "Default" StringDistanceLevenshtein = "Levenshtein" StringDistanceJaroWinkler = "JaroWinkler" StringDistanceNGram = "NGram" )
const ( SubscriptionClientMessageNone = "None" SubscriptionClientMessageAcknowledge = "Acknowledge" SubscriptionClientMessageDisposedNotification = "DisposedNotification" )
const ( // SubscriptionOpeningStrategyOpenIfFree: // The client will successfully open a subscription only if there isn't any other currently connected client. // Otherwise it will end up with SubscriptionInUseError SubscriptionOpeningStrategyOpenIfFree = "OpenIfFree" // SubscriptionOpeningStrategyTakeOver: // The connecting client will successfully open a subscription even if there is another active subscription's consumer. // If the new client takes over an existing client then the existing one will get a SubscriptionInUseException. // // The subscription will always be held by the last connected client. SubscriptionOpeningStrategyTakeOver = "TakeOver" // SubscriptionOpeningStrategyWaitForFree: // If the client currently cannot open the subscription because it is used by another client but it will wait for that client // to complete and keep attempting to gain the subscription SubscriptionOpeningStrategyWaitForFree = "WaitForFree" )
const ( SuggestionSortModeNone = "None" SuggestionSortModePopularity = "Popularity" )
const (
MethodsTypeCmpXChg = "CmpXChg"
)
Variables ¶
var ( // HTTPClientPostProcessor allows to tweak http client after it has been created // this allows replacing Transport with a custom transport that does logging, // proxying or tweaks each http request HTTPClientPostProcessor func(*http.Client) // if true, adds lots of logging to track bugs in request executor DebugLogRequestExecutor bool = false DebugTopology bool = false )
var ( SuggestionOptionsDefaultOptions = NewSuggestionOptions() SuggestionOptionsDefaultAccuracy = float32(0.5) SuggestionOptionsDefaultPageSize = 15 SuggestionOptionsDefaultDistance = StringDistanceLevenshtein SuggestionOptionsDefaultSortMode = SuggestionSortModePopularity )
var ( // DefaultFacetOptions are default facet options DefaultFacetOptions = &FacetOptions{} )
var ( // LogSubscriptions allows to monitor read/writes made by SubscriptionWorker to a tcp connection. For debugging. LogSubscriptionWorker func(op string, d []byte) = func(op string, d []byte) { } )
var ( // if true, does verbose logging. LogVerbose = false )
Functions ¶
func FieldsFor ¶
func FieldsFor(s interface{}) []string
FieldsFor returns names of all fields for the value of a struct type. They can be used in e.g. DocumentQuery.SelectFields: fields := ravendb.FieldsFor(&MyType{}) q = q.SelectFields(fields...)
func GetCollectionNameDefault ¶
func GetCollectionNameDefault(entityOrType interface{}) string
GetCollectionNameDefault is a default way of
func GetWrappedError ¶
GetWrappedError returns an error wrapped by this error If no error is wrapped, returns nil
func ParseTime ¶
ParseTime parses string time value returned by RavenDB server The value can't be parsed with a single string format
func RoundToServerTime ¶
RoundToServerTime rounds t to the same precision as round-tripping to the server and back. Useful for comparing time.Time values for equality with values returned by the server
func WithFiddler ¶
func WithFiddler() error
WithFiddler Setup proxy for fiddler. Is used for debugging purposes.
Types ¶
type AdvancedSessionExtensionBase ¶
type AdvancedSessionExtensionBase struct {
// contains filtered or unexported fields
}
AdvancedSessionExtensionBase implements common advanced session operations
func (*AdvancedSessionExtensionBase) Defer ¶
func (e *AdvancedSessionExtensionBase) Defer(commands ...ICommandData)
Defer defers multiple commands to be executed on SaveChnages
type AdvancedSessionOperations ¶
type AdvancedSessionOperations struct {
// contains filtered or unexported fields
}
AdvancedSessionOperations exposes advanced session operations
func (*AdvancedSessionOperations) AddAfterSaveChangesListener ¶
func (o *AdvancedSessionOperations) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
func (*AdvancedSessionOperations) AddBeforeDeleteListener ¶
func (o *AdvancedSessionOperations) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
func (*AdvancedSessionOperations) AddBeforeQueryListener ¶
func (o *AdvancedSessionOperations) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
func (*AdvancedSessionOperations) AddBeforeStoreListener ¶
func (o *AdvancedSessionOperations) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
func (*AdvancedSessionOperations) Attachments ¶
func (o *AdvancedSessionOperations) Attachments() *AttachmentsSessionOperations
func (*AdvancedSessionOperations) Clear ¶
func (o *AdvancedSessionOperations) Clear()
func (*AdvancedSessionOperations) ClusterTransaction ¶
func (o *AdvancedSessionOperations) ClusterTransaction() *ClusterTransactionOperations
func (*AdvancedSessionOperations) Defer ¶
func (o *AdvancedSessionOperations) Defer(commands ...ICommandData)
func (*AdvancedSessionOperations) Eagerly ¶
func (o *AdvancedSessionOperations) Eagerly() *EagerSessionOperations
func (*AdvancedSessionOperations) Evict ¶
func (o *AdvancedSessionOperations) Evict(entity interface{}) error
func (*AdvancedSessionOperations) Exists ¶
func (o *AdvancedSessionOperations) Exists(id string) (bool, error)
func (*AdvancedSessionOperations) GetChangeVectorFor ¶
func (o *AdvancedSessionOperations) GetChangeVectorFor(instance interface{}) (*string, error)
func (*AdvancedSessionOperations) GetCurrentSessionNode ¶
func (o *AdvancedSessionOperations) GetCurrentSessionNode() (*ServerNode, error)
func (*AdvancedSessionOperations) GetDocumentID ¶
func (o *AdvancedSessionOperations) GetDocumentID(instance interface{}) string
func (*AdvancedSessionOperations) GetDocumentStore ¶
func (o *AdvancedSessionOperations) GetDocumentStore() *DocumentStore
func (*AdvancedSessionOperations) GetLastModifiedFor ¶
func (o *AdvancedSessionOperations) GetLastModifiedFor(instance interface{}) (*time.Time, error)
func (*AdvancedSessionOperations) GetMaxNumberOfRequestsPerSession ¶
func (o *AdvancedSessionOperations) GetMaxNumberOfRequestsPerSession() int
func (*AdvancedSessionOperations) GetMetadataFor ¶
func (o *AdvancedSessionOperations) GetMetadataFor(instance interface{}) (*MetadataAsDictionary, error)
func (*AdvancedSessionOperations) GetNumberOfRequests ¶
func (o *AdvancedSessionOperations) GetNumberOfRequests() int
GetNumberOfRequests returns number of requests sent to the server
func (*AdvancedSessionOperations) GetRequestExecutor ¶
func (o *AdvancedSessionOperations) GetRequestExecutor() *RequestExecutor
func (*AdvancedSessionOperations) HasChanged ¶
func (o *AdvancedSessionOperations) HasChanged(entity interface{}) (bool, error)
func (*AdvancedSessionOperations) HasChanges ¶
func (o *AdvancedSessionOperations) HasChanges() bool
func (*AdvancedSessionOperations) IgnoreChangesFor ¶
func (o *AdvancedSessionOperations) IgnoreChangesFor(entity interface{}) error
func (*AdvancedSessionOperations) Increment ¶
func (o *AdvancedSessionOperations) Increment(entity interface{}, path string, valueToAdd interface{}) error
func (*AdvancedSessionOperations) IncrementByID ¶
func (o *AdvancedSessionOperations) IncrementByID(id string, path string, valueToAdd interface{}) error
func (*AdvancedSessionOperations) IsLoaded ¶
func (o *AdvancedSessionOperations) IsLoaded(id string) bool
func (*AdvancedSessionOperations) Lazily ¶
func (o *AdvancedSessionOperations) Lazily() *LazySessionOperations
func (*AdvancedSessionOperations) LoadIntoStream ¶
func (o *AdvancedSessionOperations) LoadIntoStream(ids []string, output io.Writer) error
func (*AdvancedSessionOperations) LoadStartingWith ¶
func (o *AdvancedSessionOperations) LoadStartingWith(results interface{}, args *StartsWithArgs) error
func (*AdvancedSessionOperations) LoadStartingWithIntoStream ¶
func (o *AdvancedSessionOperations) LoadStartingWithIntoStream(output io.Writer, args *StartsWithArgs) error
func (*AdvancedSessionOperations) Patch ¶
func (o *AdvancedSessionOperations) Patch(entity interface{}, path string, value interface{}) error
func (*AdvancedSessionOperations) PatchArray ¶
func (o *AdvancedSessionOperations) PatchArray(entity interface{}, pathToArray string, arrayAdder func(*JavaScriptArray)) error
func (*AdvancedSessionOperations) PatchArrayByID ¶
func (o *AdvancedSessionOperations) PatchArrayByID(id string, pathToArray string, arrayAdder func(*JavaScriptArray)) error
func (*AdvancedSessionOperations) PatchByID ¶
func (o *AdvancedSessionOperations) PatchByID(id string, path string, value interface{}) error
func (*AdvancedSessionOperations) Query ¶
func (o *AdvancedSessionOperations) Query(opts *DocumentQueryOptions) *DocumentQuery
func (*AdvancedSessionOperations) QueryCollection ¶
func (o *AdvancedSessionOperations) QueryCollection(collectionName string) *DocumentQuery
func (*AdvancedSessionOperations) QueryCollectionForType ¶
func (o *AdvancedSessionOperations) QueryCollectionForType(typ reflect.Type) *DocumentQuery
func (*AdvancedSessionOperations) QueryIndex ¶
func (o *AdvancedSessionOperations) QueryIndex(indexName string) *DocumentQuery
func (*AdvancedSessionOperations) RawQuery ¶
func (o *AdvancedSessionOperations) RawQuery(rawQuery string) *RawDocumentQuery
func (*AdvancedSessionOperations) Refresh ¶
func (o *AdvancedSessionOperations) Refresh(entity interface{}) error
func (*AdvancedSessionOperations) RemoveAfterSaveChangesListener ¶
func (o *AdvancedSessionOperations) RemoveAfterSaveChangesListener(handlerID int)
func (*AdvancedSessionOperations) RemoveBeforeDeleteListener ¶
func (o *AdvancedSessionOperations) RemoveBeforeDeleteListener(handlerID int)
func (*AdvancedSessionOperations) RemoveBeforeQueryListener ¶
func (o *AdvancedSessionOperations) RemoveBeforeQueryListener(handlerID int)
func (*AdvancedSessionOperations) RemoveBeforeStoreListener ¶
func (o *AdvancedSessionOperations) RemoveBeforeStoreListener(handlerID int)
func (*AdvancedSessionOperations) Revisions ¶
func (o *AdvancedSessionOperations) Revisions() *RevisionsSessionOperations
func (*AdvancedSessionOperations) SetMaxNumberOfRequestsPerSession ¶
func (o *AdvancedSessionOperations) SetMaxNumberOfRequestsPerSession(n int)
func (*AdvancedSessionOperations) SetTransactionMode ¶
func (o *AdvancedSessionOperations) SetTransactionMode(mode TransactionMode)
func (*AdvancedSessionOperations) Stream ¶
func (o *AdvancedSessionOperations) Stream(args *StartsWithArgs) (*StreamIterator, error)
func (*AdvancedSessionOperations) StreamQuery ¶
func (o *AdvancedSessionOperations) StreamQuery(query *DocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
func (*AdvancedSessionOperations) StreamQueryInto ¶
func (o *AdvancedSessionOperations) StreamQueryInto(query *DocumentQuery, output io.Writer) error
func (*AdvancedSessionOperations) StreamRawQuery ¶
func (o *AdvancedSessionOperations) StreamRawQuery(query *RawDocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
func (*AdvancedSessionOperations) StreamRawQueryInto ¶
func (o *AdvancedSessionOperations) StreamRawQueryInto(query *RawDocumentQuery, output io.Writer) error
func (*AdvancedSessionOperations) WaitForIndexesAfterSaveChanges ¶
func (o *AdvancedSessionOperations) WaitForIndexesAfterSaveChanges(options func(*IndexesWaitOptsBuilder))
func (*AdvancedSessionOperations) WaitForReplicationAfterSaveChanges ¶
func (o *AdvancedSessionOperations) WaitForReplicationAfterSaveChanges(options func(*ReplicationWaitOptsBuilder))
func (*AdvancedSessionOperations) WhatChanged ¶
func (o *AdvancedSessionOperations) WhatChanged() (map[string][]*DocumentsChanges, error)
type AfterSaveChangesEventArgs ¶
type AfterSaveChangesEventArgs struct { Session *InMemoryDocumentSessionOperations DocumentID string Entity interface{} // contains filtered or unexported fields }
AfterSaveChangesEventArgs describes arguments for "after save changes" listener
func (*AfterSaveChangesEventArgs) GetDocumentMetadata ¶
func (a *AfterSaveChangesEventArgs) GetDocumentMetadata() *MetadataAsDictionary
GetDocumentMetadata returns metadata for the entity represented by this event
type AggregationDocumentQuery ¶
type AggregationDocumentQuery = aggregationQueryBase
Note: AggregationDocumentQuery is fused into AggregationQueryBase because in Java AggregationQueryBase calls functions implemented in AggregationDocumentQuery and that doesn't translate to Go's embedding
func (*AggregationDocumentQuery) AndAggregateByFacet ¶
func (q *AggregationDocumentQuery) AndAggregateByFacet(facet FacetBase) *AggregationDocumentQuery
from AggregationDocumentQuery
func (*AggregationDocumentQuery) GetIndexQuery ¶
func (q *AggregationDocumentQuery) GetIndexQuery() (*IndexQuery, error)
type AggressiveCacheOptions ¶
TODO: should this be exported?
type AllTopologyNodesDownError ¶
type AllTopologyNodesDownError struct {
// contains filtered or unexported fields
}
AllTopologyNodesDownError represents "all topology nodes are down" error
func (*AllTopologyNodesDownError) Error ¶
func (e *AllTopologyNodesDownError) Error() string
Error makes it conform to error interface
func (*AllTopologyNodesDownError) WrappedError ¶
func (e *AllTopologyNodesDownError) WrappedError() error
hackish way to get a wrapped error
type AttachmentDetails ¶
type AttachmentDetails struct { AttachmentName ChangeVector *string `json:"ChangeVector"` DocumentID string `json:"DocumentId"` }
AttachmentDetails represents details of an attachment
type AttachmentName ¶
type AttachmentName struct { Name string `json:"Name"` Hash string `json:"Hash"` ContentType string `json:"ContentType"` Size int64 `json:"Size"` }
AttachmentName represents infor about an attachment
type AttachmentResult ¶
type AttachmentResult struct { Data io.Reader Details *AttachmentDetails // contains filtered or unexported fields }
AttachmentResult represents an attachment
func (*AttachmentResult) Close ¶
func (r *AttachmentResult) Close() error
Close closes the attachment
type AttachmentType ¶
type AttachmentType = string
type AttachmentsSessionOperations ¶
type AttachmentsSessionOperations = DocumentSessionAttachments
TODO: make a unique wrapper type
type AuthorizationError ¶
type AuthorizationError struct {
// contains filtered or unexported fields
}
AuthorizationError represents authorization error
func (*AuthorizationError) Error ¶
func (e *AuthorizationError) Error() string
Error makes it conform to error interface
func (*AuthorizationError) WrappedError ¶
func (e *AuthorizationError) WrappedError() error
hackish way to get a wrapped error
type BadRequestError ¶
type BadRequestError struct {
RavenError
}
BadRequestError maps to server's 400 Bad Request response This is additional information sent by the server
func (*BadRequestError) Error ¶
func (e *BadRequestError) Error() string
Error makes it conform to error interface
func (*BadRequestError) WrappedError ¶
func (e *BadRequestError) WrappedError() error
hackish way to get a wrapped error
type BadResponseError ¶
type BadResponseError struct {
RavenError
}
BadResponseError represents "bad response" error
func (*BadResponseError) Error ¶
func (e *BadResponseError) Error() string
Error makes it conform to error interface
func (*BadResponseError) WrappedError ¶
func (e *BadResponseError) WrappedError() error
hackish way to get a wrapped error
type BatchCommand ¶
type BatchCommand struct { RavenCommandBase Result *JSONArrayResult // contains filtered or unexported fields }
BatchCommand represents batch command
func (*BatchCommand) Close ¶
func (c *BatchCommand) Close() error
func (*BatchCommand) CreateRequest ¶
func (c *BatchCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*BatchCommand) SetResponse ¶
func (c *BatchCommand) SetResponse(response []byte, fromCache bool) error
type BatchOperation ¶
type BatchOperation struct {
// contains filtered or unexported fields
}
BatchOperation represents a batch operation
type BatchOptions ¶
type BatchOptions struct {
// contains filtered or unexported fields
}
BatchOptions describes options for batch operations
func NewBatchOptions ¶
func NewBatchOptions() *BatchOptions
NewBatchOptions returns new BatchOptions
type BeforeDeleteEventArgs ¶
type BeforeDeleteEventArgs struct { Session *InMemoryDocumentSessionOperations DocumentID string Entity interface{} // contains filtered or unexported fields }
BeforeDeleteEventArgs describes arguments for "before delete" listener
func (*BeforeDeleteEventArgs) GetDocumentMetadata ¶
func (a *BeforeDeleteEventArgs) GetDocumentMetadata() *MetadataAsDictionary
GetDocumentMetadata returns metadata for the entity being deleted
type BeforeQueryEventArgs ¶
type BeforeQueryEventArgs struct { Session *InMemoryDocumentSessionOperations QueryCustomization *DocumentQueryCustomization }
BeforeQueryEventArgs describes arguments for "before query" event
type BeforeStoreEventArgs ¶
type BeforeStoreEventArgs struct { Session *InMemoryDocumentSessionOperations DocumentID string Entity interface{} // contains filtered or unexported fields }
BeforeStoreEventArgs describe arguments for "before store" listener
func (*BeforeStoreEventArgs) GetDocumentMetadata ¶
func (a *BeforeStoreEventArgs) GetDocumentMetadata() *MetadataAsDictionary
GetDocumentMetadata returns metadata for entity represented by this event
type BulkInsertAbortedError ¶
type BulkInsertAbortedError struct {
RavenError
}
BulkInsertAbortedError represents "bulk insert aborted" error
func (*BulkInsertAbortedError) Error ¶
func (e *BulkInsertAbortedError) Error() string
Error makes it conform to error interface
func (*BulkInsertAbortedError) WrappedError ¶
func (e *BulkInsertAbortedError) WrappedError() error
hackish way to get a wrapped error
type BulkInsertCommand ¶
type BulkInsertCommand struct { RavenCommandBase Result *http.Response // contains filtered or unexported fields }
BulkInsertCommand describes build insert command
func NewBulkInsertCommand ¶
func NewBulkInsertCommand(id int64, stream io.Reader, useCompression bool) *BulkInsertCommand
NewBulkInsertCommand returns new BulkInsertCommand
func (*BulkInsertCommand) CreateRequest ¶
func (c *BulkInsertCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*BulkInsertCommand) SetResponse ¶
func (c *BulkInsertCommand) SetResponse(response []byte, fromCache bool) error
type BulkInsertOperation ¶
type BulkInsertOperation struct { Command *BulkInsertCommand // contains filtered or unexported fields }
BulkInsertOperation represents bulk insert operation
func NewBulkInsertOperation ¶
func NewBulkInsertOperation(database string, store *DocumentStore) *BulkInsertOperation
NewBulkInsertOperation returns new BulkInsertOperation
func (*BulkInsertOperation) Abort ¶
func (o *BulkInsertOperation) Abort() error
Abort aborts insert operation
func (*BulkInsertOperation) Close ¶
func (o *BulkInsertOperation) Close() error
Close closes operation
func (*BulkInsertOperation) GetID ¶
func (o *BulkInsertOperation) GetID(entity interface{}) (string, error)
GetID returns id for an entity
func (*BulkInsertOperation) Store ¶
func (o *BulkInsertOperation) Store(entity interface{}, metadata *MetadataAsDictionary) (string, error)
Store schedules entity for storing and returns its id. metadata can be nil
func (*BulkInsertOperation) StoreWithID ¶
func (o *BulkInsertOperation) StoreWithID(entity interface{}, id string, metadata *MetadataAsDictionary) error
StoreWithID stores an entity with a given id
func (*BulkInsertOperation) WaitForID ¶
func (o *BulkInsertOperation) WaitForID() error
WaitForID waits for operation id to finish
type BulkInsertProtocolViolationError ¶
type BulkInsertProtocolViolationError struct {
RavenError
}
func (*BulkInsertProtocolViolationError) Error ¶
func (e *BulkInsertProtocolViolationError) Error() string
Error makes it conform to error interface
func (*BulkInsertProtocolViolationError) WrappedError ¶
func (e *BulkInsertProtocolViolationError) WrappedError() error
hackish way to get a wrapped error
type CancelFunc ¶
type CancelFunc func()
type CancellationError ¶
type CancellationError struct { }
func (*CancellationError) Error ¶
func (e *CancellationError) Error() string
type CertificateNameMismatchError ¶
type CertificateNameMismatchError struct {
// contains filtered or unexported fields
}
CertificateNameMismatchError is returned when subscription is in use
func (*CertificateNameMismatchError) Error ¶
func (e *CertificateNameMismatchError) Error() string
Error makes it conform to error interface
func (*CertificateNameMismatchError) WrappedError ¶
func (e *CertificateNameMismatchError) WrappedError() error
hackish way to get a wrapped error
type ChangeProcessingError ¶
type ChangeProcessingError struct {
RavenError
}
func (*ChangeProcessingError) Error ¶
func (e *ChangeProcessingError) Error() string
Error makes it conform to error interface
func (*ChangeProcessingError) WrappedError ¶
func (e *ChangeProcessingError) WrappedError() error
hackish way to get a wrapped error
type ChangeType ¶
type ChangeType int
ChangeType describes a type of a change in a document
const ( // TODO: make those into a string? DocumentChangeDocumentDeleted ChangeType = iota DocumentChangeDocumentAdded DocumentChangeFieldChanged DocumentChangeNewField DocumentChangeRemovedField DocumentChangeArrayValueChanged DocumentChangeArrayValueAdded DocumentChangeArrayValueRemoved DocumentChangeFieldTypeChanged DocumentChangeEntityTypeChanged )
type CircleCriteria ¶
type CircleCriteria struct { SpatialCriteriaCommon // contains filtered or unexported fields }
CircleCriteria describes circle criteria
func NewCircleCriteria ¶
func NewCircleCriteria(radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits, relation SpatialRelation, distErrorPercent float64) *CircleCriteria
NewCircleCriteria returns new CircleCriteria
func (*CircleCriteria) GetShapeToken ¶
func (c *CircleCriteria) GetShapeToken(addQueryParameter func(interface{}) string) *shapeToken
GetShapeToken returns shapeToken
func (*CircleCriteria) ToQueryToken ¶
func (c *CircleCriteria) ToQueryToken(fieldName string, addQueryParameter func(interface{}) string) queryToken
ToQueryToken creates a token
type ClientConfiguration ¶
type ClientConfiguration struct { Etag int64 `json:"Etag"` IsDisabled bool `json:"Disabled"` // TODO: should this be *int ? MaxNumberOfRequestsPerSession int `json:"MaxNumberOfRequestsPerSession"` ReadBalanceBehavior ReadBalanceBehavior `json:"ReadBalanceBehavior"` }
ClientConfiguration represents client configuration
type ClientVersionMismatchError ¶
type ClientVersionMismatchError struct {
RavenError
}
ClientVersionMismatchError is returned when subscription is in use
func (*ClientVersionMismatchError) Error ¶
func (e *ClientVersionMismatchError) Error() string
Error makes it conform to error interface
func (*ClientVersionMismatchError) WrappedError ¶
func (e *ClientVersionMismatchError) WrappedError() error
hackish way to get a wrapped error
type ClusterRequestExecutor ¶
type ClusterRequestExecutor = RequestExecutor
Note: for simplicity ClusterRequestExecutor logic is implemented in RequestExecutor because Go doesn't support inheritance
type ClusterTopology ¶
type ClusterTopology struct { TopologyID string `json:"TopologyId"` AllNodes map[string]string `json:"AllNodes"` // Those map name like A to server url like http://localhost:9999 Members map[string]string `json:"Members"` Promotables map[string]string `json:"Promotables"` Watchers map[string]string `json:"Watchers"` LastNodeId string `json:"LastNodeId"` Etag int `json:"Etag"` }
ClusterTopology is a part of ClusterTopologyResponse
type ClusterTransactionOperations ¶
type ClusterTransactionOperations struct {
// contains filtered or unexported fields
}
func (*ClusterTransactionOperations) Clear ¶
func (cto *ClusterTransactionOperations) Clear()
func (*ClusterTransactionOperations) CreateCompareExchangeValue ¶
func (cto *ClusterTransactionOperations) CreateCompareExchangeValue(key string, item interface{}) (interface{}, error)
func (*ClusterTransactionOperations) DeleteCompareExchangeValue ¶
func (cto *ClusterTransactionOperations) DeleteCompareExchangeValue(item *CompareExchangeValue) error
func (*ClusterTransactionOperations) DeleteCompareExchangeValueByKey ¶
func (cto *ClusterTransactionOperations) DeleteCompareExchangeValueByKey(key string, index int64) error
func (*ClusterTransactionOperations) GetCompareExchangeValue ¶
func (cto *ClusterTransactionOperations) GetCompareExchangeValue(clazz reflect.Type, key string) (*CompareExchangeValue, error)
func (*ClusterTransactionOperations) GetCompareExchangeValues ¶
func (cto *ClusterTransactionOperations) GetCompareExchangeValues(clazz reflect.Type, startsWith string, start int, pageSize int) (map[string]*CompareExchangeValue, error)
func (*ClusterTransactionOperations) GetCompareExchangeValuesWithKeys ¶
func (cto *ClusterTransactionOperations) GetCompareExchangeValuesWithKeys(clazz reflect.Type, keys []string) (map[string]*CompareExchangeValue, error)
func (*ClusterTransactionOperations) GetNumberOfTrackedCompareExchangeValues ¶
func (cto *ClusterTransactionOperations) GetNumberOfTrackedCompareExchangeValues() int
func (*ClusterTransactionOperations) IsTracked ¶
func (cto *ClusterTransactionOperations) IsTracked(key string) bool
type CmpXchg ¶
type CmpXchg struct {
MethodCallData
}
CmpXchg represents data for cmp xchg method
func CmpXchgValue ¶
CmpXchgValue returns CmpXchg for a given key
type CollectionStatistics ¶
type CollectionStatistics struct { CountOfDocuments int `json:"CountOfDocuments"` CountOfConflicts int `json:"CountOfConflicts"` Collections map[string]int `json:"Collections"` }
CollectionStatistics describes collection statistics
type CollectionStats ¶
type CollectionStats struct { LastProcessedDocumentEtag int64 `json:"LastProcessedDocumentEtag"` LastProcessedTombstoneEtag int64 `json:"LastProcessedTombstoneEtag"` DocumentLag int64 `json:"DocumentLag"` TombstoneLag int64 `json:"TombstoneLag"` }
func NewCollectionStats ¶
func NewCollectionStats() *CollectionStats
type CommandData ¶
type CommandData struct { ID string Name string ChangeVector *string Type CommandType }
CommandData describes common data for commands
type CommandExecutionError ¶
type CommandExecutionError struct {
RavenError
}
func (*CommandExecutionError) Error ¶
func (e *CommandExecutionError) Error() string
Error makes it conform to error interface
func (*CommandExecutionError) WrappedError ¶
func (e *CommandExecutionError) WrappedError() error
hackish way to get a wrapped error
type CompactDatabaseCommand ¶
type CompactDatabaseCommand struct { RavenCommandBase Result *OperationIDResult // contains filtered or unexported fields }
CompactDatabaseCommand describes "compact database" command
func NewCompactDatabaseCommand ¶
func NewCompactDatabaseCommand(conventions *DocumentConventions, compactSettings *CompactSettings) (*CompactDatabaseCommand, error)
NewCompactDatabaseCommand returns new CompactDatabaseCommand
func (*CompactDatabaseCommand) CreateRequest ¶
func (c *CompactDatabaseCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*CompactDatabaseCommand) SetResponse ¶
func (c *CompactDatabaseCommand) SetResponse(response []byte, fromCache bool) error
type CompactDatabaseOperation ¶
type CompactDatabaseOperation struct { Command *CompactDatabaseCommand // contains filtered or unexported fields }
CompactDatabaseOperation describes "compact database" operation
func NewCompactDatabaseOperation ¶
func NewCompactDatabaseOperation(compactSettings *CompactSettings) *CompactDatabaseOperation
NewCompactDatabaseOperation returns new CompactDatabaseOperation
func (*CompactDatabaseOperation) GetCommand ¶
func (o *CompactDatabaseOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns a command
type CompactSettings ¶
type CompactSettings struct { DatabaseName string `json:"DatabaseName"` Documents bool `json:"Documents"` Indexes []string `json:"Indexes,omitempty"` }
CompactSettings is an argument to CompactDatabaseOperation
type CompareExchangeResult ¶
CompareExchangeResult describes result of compare exchange
type CompareExchangeSessionValue ¶
type CompareExchangeSessionValue struct {
// contains filtered or unexported fields
}
func NewCompareExchangeSessionValue ¶
func NewCompareExchangeSessionValue(key string, index int64, state CompareExchangeValueState) (*CompareExchangeSessionValue, error)
func NewCompareExchangeSessionValueWithValue ¶
func NewCompareExchangeSessionValueWithValue(value *CompareExchangeValue) (*CompareExchangeSessionValue, error)
func (*CompareExchangeSessionValue) Create ¶
func (cesv *CompareExchangeSessionValue) Create(item interface{}) (interface{}, error)
func (*CompareExchangeSessionValue) Delete ¶
func (cesv *CompareExchangeSessionValue) Delete(index int64)
func (*CompareExchangeSessionValue) GetCommand ¶
func (cesv *CompareExchangeSessionValue) GetCommand(session *InMemoryDocumentSessionOperations) (ICommandData, error)
func (*CompareExchangeSessionValue) GetValue ¶
func (cesv *CompareExchangeSessionValue) GetValue(clazz reflect.Type, session *InMemoryDocumentSessionOperations) (*CompareExchangeValue, error)
func (*CompareExchangeSessionValue) UpdateState ¶
func (cesv *CompareExchangeSessionValue) UpdateState(index int64) error
func (*CompareExchangeSessionValue) UpdateValue ¶
func (cesv *CompareExchangeSessionValue) UpdateValue(value *CompareExchangeValue) error
type CompareExchangeValue ¶
type CompareExchangeValue struct { Key string Index int64 Value interface{} ChangeVector *string Metadata *MetadataAsDictionary }
CompareExchangeValue represents value for compare exchange
func NewCompareExchangeValue ¶
func NewCompareExchangeValue(key string, index int64, value interface{}) *CompareExchangeValue
NewCompareExchangeValue returns new CompareExchangeValue
func NewCompareExchangeValueBase ¶
func NewCompareExchangeValueBase(key string, index int64, value interface{}, changeVector *string, dictionary *MetadataAsDictionary) *CompareExchangeValue
func (*CompareExchangeValue) GetIndex ¶
func (cev *CompareExchangeValue) GetIndex() int64
func (*CompareExchangeValue) GetKey ¶
func (cev *CompareExchangeValue) GetKey() string
func (*CompareExchangeValue) GetMetadata ¶
func (cev *CompareExchangeValue) GetMetadata() *MetadataAsDictionary
func (*CompareExchangeValue) GetValue ¶
func (cev *CompareExchangeValue) GetValue() interface{}
func (*CompareExchangeValue) HasMetadata ¶
func (cev *CompareExchangeValue) HasMetadata() bool
func (*CompareExchangeValue) SetIndex ¶
func (cev *CompareExchangeValue) SetIndex(index int64)
type CompareExchangeValueState ¶
type CompareExchangeValueState = int
type CompilationError ¶
type CompilationError struct {
RavenError
}
func (*CompilationError) Error ¶
func (e *CompilationError) Error() string
Error makes it conform to error interface
func (*CompilationError) WrappedError ¶
func (e *CompilationError) WrappedError() error
hackish way to get a wrapped error
type ConcurrencyCheckMode ¶
type ConcurrencyCheckMode int
ConcurrencyCheckMode describes concurrency check
const ( // ConcurrencyCheckAuto is automatic optimistic concurrency check depending on UseOptimisticConcurrency setting or provided Change Vector ConcurrencyCheckAuto ConcurrencyCheckMode = iota // ConcurrencyCheckForced forces optimistic concurrency check even if UseOptimisticConcurrency is not set ConcurrencyCheckForced // ConcurrencyCheckDisabled disables optimistic concurrency check even if UseOptimisticConcurrency is set ConcurrencyCheckDisabled )
type ConcurrencyError ¶
type ConcurrencyError struct { RavenError ExpectedETag int64 ActualETag int64 ExpectedChangeVector string ActualChangeVector string }
ConcurrencyError represents concurrency error
func (*ConcurrencyError) Error ¶
func (e *ConcurrencyError) Error() string
Error makes it conform to error interface
func (*ConcurrencyError) WrappedError ¶
func (e *ConcurrencyError) WrappedError() error
hackish way to get a wrapped error
type ConfigureRevisionsCommand ¶
type ConfigureRevisionsCommand struct { RavenCommandBase Result *ConfigureRevisionsOperationResult // contains filtered or unexported fields }
ConfigureRevisionsCommand represents configure revisions command
func NewConfigureRevisionsCommand ¶
func NewConfigureRevisionsCommand(configuration *RevisionsConfiguration) *ConfigureRevisionsCommand
NewConfigureRevisionsCommand returns new ConfigureRevisionsCommand
func (*ConfigureRevisionsCommand) CreateRequest ¶
func (c *ConfigureRevisionsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*ConfigureRevisionsCommand) SetResponse ¶
func (c *ConfigureRevisionsCommand) SetResponse(response []byte, fromCache bool) error
type ConfigureRevisionsOperation ¶
type ConfigureRevisionsOperation struct { Command *ConfigureRevisionsCommand // contains filtered or unexported fields }
ConfigureRevisionsOperation represents configure revisions operation
func NewConfigureRevisionsOperation ¶
func NewConfigureRevisionsOperation(configuration *RevisionsConfiguration) *ConfigureRevisionsOperation
NewConfigureRevisionsOperation returns new ConfigureRevisionsOperation
func (*ConfigureRevisionsOperation) GetCommand ¶
func (o *ConfigureRevisionsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns new RavenCommand for this operation
type ConfigureRevisionsOperationResult ¶
type ConfigureRevisionsOperationResult struct {
RaftCommandIndex int64 `json:"RaftCommandIndex"`
}
ConfigureRevisionsOperationResult represents result of configure revisions operation
type Conflict ¶
type Conflict struct { LastModified Time `json:"LastModified"` ChangeVector string `json:"ChangeVector"` Doc map[string]interface{} `json:"Doc"` }
Conflict represents conflict
type ConflictError ¶
type ConflictError struct {
RavenError
}
ConflictError maps to server's 409 Conflict response
func (*ConflictError) Error ¶
func (e *ConflictError) Error() string
Error makes it conform to error interface
func (*ConflictError) WrappedError ¶
func (e *ConflictError) WrappedError() error
hackish way to get a wrapped error
type ConflictSolver ¶
type ConflictSolver struct { ResolveByCollection map[string]*ScriptResolver `json:"ResolveByCollection"` ResolveToLatest bool `json:"ResolveToLatest"` }
ConflictSolver describes how to resolve conflicts
type ConnectionString ¶
type ConnectionString struct { Name string `json:"Name"` // Note: Java has this as a virtual function getType() Type ConnectionStringType `json:"Type"` }
ConnectionString represents connection string used as argument to PutConnectionStringCommand
type ConnectionStringType ¶
type ConnectionStringType = string
TODO: only used in ConnectionString which is unused
type CreateDatabaseCommand ¶
type CreateDatabaseCommand struct { RavenCommandBase Result *DatabasePutResult // contains filtered or unexported fields }
CreateDatabaseCommand represents "create database" command
func NewCreateDatabaseCommand ¶
func NewCreateDatabaseCommand(conventions *DocumentConventions, databaseRecord *DatabaseRecord, replicationFactor int) (*CreateDatabaseCommand, error)
NewCreateDatabaseCommand returns new CreateDatabaseCommand
func (*CreateDatabaseCommand) CreateRequest ¶
func (c *CreateDatabaseCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*CreateDatabaseCommand) SetResponse ¶
func (c *CreateDatabaseCommand) SetResponse(response []byte, fromCache bool) error
type CreateDatabaseOperation ¶
type CreateDatabaseOperation struct {
// contains filtered or unexported fields
}
CreateDatabaseOperation represents "create database" operation
func NewCreateDatabaseOperation ¶
func NewCreateDatabaseOperation(databaseRecord *DatabaseRecord, replicationFactor int) *CreateDatabaseOperation
NewCreateDatabaseOperation returns CreateDatabaseOperation
func (*CreateDatabaseOperation) GetCommand ¶
func (o *CreateDatabaseOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns command for this operation
type CreateSampleDataCommand ¶
type CreateSampleDataCommand struct {
RavenCommandBase
}
CreateSampleDataCommand represents command for creating sample data
func NewCreateSampleDataCommand ¶
func NewCreateSampleDataCommand(conventions *DocumentConventions) *CreateSampleDataCommand
NewCreateSampleDataCommand returns new CreateSampleDataCommand
func (*CreateSampleDataCommand) CreateRequest ¶
func (c *CreateSampleDataCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type CreateSampleDataOperation ¶
type CreateSampleDataOperation struct {
Command *CreateSampleDataCommand
}
CreateSampleDataOperation represents operation to create sample data
func NewCreateSampleDataOperation ¶
func NewCreateSampleDataOperation() *CreateSampleDataOperation
NewCreateSampleDataOperation
func (*CreateSampleDataOperation) GetCommand ¶
func (o *CreateSampleDataOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns a comman
type CreateSubscriptionCommand ¶
type CreateSubscriptionCommand struct { RavenCommandBase Result *CreateSubscriptionResult // contains filtered or unexported fields }
CreateSubscriptionCommand represents "create subscription" command
func (*CreateSubscriptionCommand) CreateRequest ¶
func (c *CreateSubscriptionCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*CreateSubscriptionCommand) SetResponse ¶
func (c *CreateSubscriptionCommand) SetResponse(response []byte, fromCache bool) error
type CreateSubscriptionResult ¶
type CreateSubscriptionResult struct {
Name string `json:"Name"`
}
CreateSubscriptionResult represents result for "create subscription" command
type CurrentIndexAndNode ¶
type CurrentIndexAndNode struct {
// contains filtered or unexported fields
}
func NewCurrentIndexAndNode ¶
func NewCurrentIndexAndNode(currentIndex int, currentNode *ServerNode) *CurrentIndexAndNode
type DatabaseChanges ¶
type DatabaseChanges struct {
// contains filtered or unexported fields
}
DatabaseChanges notifies about changes to a database
func (*DatabaseChanges) AddConnectionStatusChanged ¶
func (c *DatabaseChanges) AddConnectionStatusChanged(handler func()) int
func (*DatabaseChanges) AddOnError ¶
func (c *DatabaseChanges) AddOnError(handler func(error)) int
func (*DatabaseChanges) Close ¶
func (c *DatabaseChanges) Close()
Close closes DatabaseChanges and release its resources
func (*DatabaseChanges) EnsureConnectedNow ¶
func (c *DatabaseChanges) EnsureConnectedNow() error
func (*DatabaseChanges) ForAllDocuments ¶
func (c *DatabaseChanges) ForAllDocuments(cb func(*DocumentChange)) (CancelFunc, error)
ForAllDocuments registers a callback that will be called for changes on all documents. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForAllIndexes ¶
func (c *DatabaseChanges) ForAllIndexes(cb func(*IndexChange)) (CancelFunc, error)
ForAllIndexes registers a callback that will be called when a change on any index happens. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForAllOperations ¶
func (c *DatabaseChanges) ForAllOperations(cb func(change *OperationStatusChange)) (CancelFunc, error)
ForAllOperations registers a callback that will be called when any operation changes status. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForDocument ¶
func (c *DatabaseChanges) ForDocument(docID string, cb func(*DocumentChange)) (CancelFunc, error)
ForDocument registers a callback that will be called for changes on a ocument with a given id It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForDocumentsInCollection ¶
func (c *DatabaseChanges) ForDocumentsInCollection(collectionName string, cb func(*DocumentChange)) (CancelFunc, error)
ForDocumentsInCollection registers a callback that will be called on changes for documents in a given collection. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForDocumentsInCollectionOfType ¶
func (c *DatabaseChanges) ForDocumentsInCollectionOfType(clazz reflect.Type, cb func(*DocumentChange)) (CancelFunc, error)
ForDocumentsInCollectionOfType registers a callback that will be called on changes for documents of a given type. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForDocumentsStartingWith ¶
func (c *DatabaseChanges) ForDocumentsStartingWith(docIDPrefix string, cb func(*DocumentChange)) (CancelFunc, error)
ForDocumentsStartingWith registers a callback that will be called for changes on documents whose id starts with a given prefix. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForIndex ¶
func (c *DatabaseChanges) ForIndex(indexName string, cb func(*IndexChange)) (CancelFunc, error)
ForIndex registers a callback that will be called for changes in an index with a given name. It returns a function to call to unregister the callback.
func (*DatabaseChanges) ForOperationID ¶
func (c *DatabaseChanges) ForOperationID(operationID int64, cb func(*OperationStatusChange)) (CancelFunc, error)
ForOperationID registers a callback that will be called when a change happens to operation with a given id. It returns a function to call to unregister the callback.
func (*DatabaseChanges) RemoveConnectionStatusChanged ¶
func (c *DatabaseChanges) RemoveConnectionStatusChanged(handlerID int)
func (*DatabaseChanges) RemoveOnError ¶
func (c *DatabaseChanges) RemoveOnError(handlerID int)
type DatabaseConcurrentLoadTimeoutError ¶
type DatabaseConcurrentLoadTimeoutError struct {
RavenError
}
func (*DatabaseConcurrentLoadTimeoutError) Error ¶
func (e *DatabaseConcurrentLoadTimeoutError) Error() string
Error makes it conform to error interface
func (*DatabaseConcurrentLoadTimeoutError) WrappedError ¶
func (e *DatabaseConcurrentLoadTimeoutError) WrappedError() error
hackish way to get a wrapped error
type DatabaseDisabledError ¶
type DatabaseDisabledError struct {
RavenError
}
func (*DatabaseDisabledError) Error ¶
func (e *DatabaseDisabledError) Error() string
Error makes it conform to error interface
func (*DatabaseDisabledError) WrappedError ¶
func (e *DatabaseDisabledError) WrappedError() error
hackish way to get a wrapped error
type DatabaseDoesNotExistError ¶
type DatabaseDoesNotExistError struct {
RavenError
}
DatabaseDoesNotExistError represents "database not not exist" error
func (*DatabaseDoesNotExistError) Error ¶
func (e *DatabaseDoesNotExistError) Error() string
Error makes it conform to error interface
func (*DatabaseDoesNotExistError) WrappedError ¶
func (e *DatabaseDoesNotExistError) WrappedError() error
hackish way to get a wrapped error
type DatabaseLoadFailureError ¶
type DatabaseLoadFailureError struct {
RavenError
}
func (*DatabaseLoadFailureError) Error ¶
func (e *DatabaseLoadFailureError) Error() string
Error makes it conform to error interface
func (*DatabaseLoadFailureError) WrappedError ¶
func (e *DatabaseLoadFailureError) WrappedError() error
hackish way to get a wrapped error
type DatabaseLoadTimeoutError ¶
type DatabaseLoadTimeoutError struct {
RavenError
}
func (*DatabaseLoadTimeoutError) Error ¶
func (e *DatabaseLoadTimeoutError) Error() string
Error makes it conform to error interface
func (*DatabaseLoadTimeoutError) WrappedError ¶
func (e *DatabaseLoadTimeoutError) WrappedError() error
hackish way to get a wrapped error
type DatabaseNotRelevantError ¶
type DatabaseNotRelevantError struct {
RavenError
}
func (*DatabaseNotRelevantError) Error ¶
func (e *DatabaseNotRelevantError) Error() string
Error makes it conform to error interface
func (*DatabaseNotRelevantError) WrappedError ¶
func (e *DatabaseNotRelevantError) WrappedError() error
hackish way to get a wrapped error
type DatabasePromotionStatus ¶
type DatabasePromotionStatus = string
type DatabasePutResult ¶
type DatabasePutResult struct { RaftCommandIndex int64 `json:"RaftCommandIndex"` Name string `json:"Name"` DatabaseTopology Topology `json:"Topology"` NodesAddedTo []string `json:"NodesAddedTo"` }
DatabasePutResult describes server response for e.g. CreateDatabaseCommand
type DatabaseRecord ¶
type DatabaseRecord struct { DatabaseName string `json:"DatabaseName"` Disabled bool `json:"Disabled"` DataDirectory string `json:"DataDirectory,omitempty"` Settings map[string]string `json:"Settings"` ConflictSolverConfig *ConflictSolver `json:"ConflictSolverConfig"` Encrypted bool `json:"Encrypted"` DatabaseTopology *DatabaseTopology `json:"DatabaseTopology"` }
DatabaseRecord represents database record
func NewDatabaseRecord ¶
func NewDatabaseRecord() *DatabaseRecord
NewDatabaseRecord returns new database record
type DatabaseRecordWithEtag ¶
type DatabaseRecordWithEtag struct { DatabaseRecord Etag int64 `json:"Etag"` }
DatabaseRecordWithEtag represents database record with etag
type DatabaseStatistics ¶
type DatabaseStatistics struct { LastDocEtag int64 `json:"LastDocEtag"` CountOfIndexes int `json:"CountOfIndexes"` CountOfDocuments int64 `json:"CountOfDocuments"` CountOfRevisionDocuments int64 `json:"CountOfRevisionDocuments"` // TODO: present in Java, not seen in JSON CountOfDocumentsConflicts int64 `json:"CountOfDocumentsConflicts"` CountOfTombstones int64 `json:"CountOfTombstones"` CountOfConflicts int64 `json:"CountOfConflicts"` CountOfAttachments int64 `json:"CountOfAttachments"` CountOfUniqueAttachments int64 `json:"CountOfUniqueAttachments"` Indexes []*IndexInformation `json:"Indexes"` DatabaseChangeVector string `json:"DatabaseChangeVector"` DatabaseID string `json:"DatabaseId"` Is64Bit bool `json:"Is64Bit"` Pager string `json:"Pager"` LastIndexingTime *Time `json:"LastIndexingTime"` SizeOnDisk *Size `json:"SizeOnDisk"` TempBuffersSizeOnDisk *Size `json:"TempBuffersSizeOnDisk"` NumberOfTransactionMergerQueueOperations int `json:"NumberOfTransactionMergerQueueOperations"` }
DatabaseStatistics describes a result of GetStatisticsCommand
func (*DatabaseStatistics) GetLastIndexingTime ¶
func (s *DatabaseStatistics) GetLastIndexingTime() *time.Time
GetLastIndexingTime returns last indexing time
type DatabaseTopology ¶
type DatabaseTopology struct { Members []string `json:"Members"` Promotables []string `json:"Promotables"` Rehabs []string `json:"Rehabs"` PredefinedMentors map[string]string `json:"PredefinedMentors"` DemotionReasons map[string]string `json:"DemotionReasons"` PromotablesStatus map[string]string `json:"PromotablesStatus"` ReplicationFactor int `json:"ReplicationFactor"` DynamicNodesDistribution bool `json:"DynamicNodesDistribution"` Stamp LeaderStamp `json:"Stamp"` }
DatabaseTopology describes a topology of the database
type DeleteAttachmentCommand ¶
type DeleteAttachmentCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewDeleteAttachmentCommand ¶
func NewDeleteAttachmentCommand(documentID string, name string, changeVector *string) (*DeleteAttachmentCommand, error)
func (*DeleteAttachmentCommand) CreateRequest ¶
func (c *DeleteAttachmentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type DeleteAttachmentCommandData ¶
type DeleteAttachmentCommandData struct {
*CommandData
}
func NewDeleteAttachmentCommandData ¶
func NewDeleteAttachmentCommandData(documentID string, name string, changeVector *string) (*DeleteAttachmentCommandData, error)
NewDeleteAttachmentCommandData creates CommandData for Delete Attachment command
type DeleteAttachmentOperation ¶
type DeleteAttachmentOperation struct { Command *DeleteAttachmentCommand // contains filtered or unexported fields }
func NewDeleteAttachmentOperation ¶
func NewDeleteAttachmentOperation(documentID string, name string, changeVector *string) *DeleteAttachmentOperation
func (*DeleteAttachmentOperation) GetCommand ¶
func (o *DeleteAttachmentOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type DeleteByIndexCommand ¶
type DeleteByIndexCommand struct { RavenCommandBase Result *OperationIDResult // contains filtered or unexported fields }
func NewDeleteByIndexCommand ¶
func NewDeleteByIndexCommand(conventions *DocumentConventions, queryToDelete *IndexQuery, options *QueryOperationOptions) (*DeleteByIndexCommand, error)
func (*DeleteByIndexCommand) CreateRequest ¶
func (c *DeleteByIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*DeleteByIndexCommand) SetResponse ¶
func (c *DeleteByIndexCommand) SetResponse(response []byte, fromCache bool) error
type DeleteByQueryOperation ¶
type DeleteByQueryOperation struct { Command *DeleteByIndexCommand // contains filtered or unexported fields }
func NewDeleteByQueryOperation ¶
func NewDeleteByQueryOperation(queryToDelete *IndexQuery, options *QueryOperationOptions) (*DeleteByQueryOperation, error)
func (*DeleteByQueryOperation) GetCommand ¶
func (o *DeleteByQueryOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type DeleteCommandData ¶
type DeleteCommandData struct {
CommandData
}
DeleteCommandData represents data for delete command
type DeleteCompareExchangeCommandData ¶
type DeleteCompareExchangeCommandData struct { *CommandData Index int64 }
type DeleteCompareExchangeValueOperation ¶
type DeleteCompareExchangeValueOperation struct { Command *RemoveCompareExchangeValueCommand // contains filtered or unexported fields }
func (*DeleteCompareExchangeValueOperation) GetCommand ¶
func (o *DeleteCompareExchangeValueOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type DeleteDatabaseCommand ¶
type DeleteDatabaseCommand struct { RavenCommandBase Result *DeleteDatabaseResult // contains filtered or unexported fields }
func NewDeleteDatabaseCommand ¶
func NewDeleteDatabaseCommand(conventions *DocumentConventions, parameters *DeleteDatabaseParameters) (*DeleteDatabaseCommand, error)
func (*DeleteDatabaseCommand) CreateRequest ¶
func (c *DeleteDatabaseCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*DeleteDatabaseCommand) SetResponse ¶
func (c *DeleteDatabaseCommand) SetResponse(response []byte, fromCache bool) error
type DeleteDatabaseResult ¶
type DeleteDatabaseResult struct { RaftCommandIndex int64 `json:"RaftCommandIndex"` PendingDeletes []string `json:"PendingDeletes"` }
DeleteDatabaseResult represents result of Delete Database command
type DeleteDatabasesOperation ¶
type DeleteDatabasesOperation struct { Command *DeleteDatabaseCommand // contains filtered or unexported fields }
func NewDeleteDatabasesOperation ¶
func NewDeleteDatabasesOperation(databaseName string, hardDelete bool) *DeleteDatabasesOperation
func NewDeleteDatabasesOperationWithParameters ¶
func NewDeleteDatabasesOperationWithParameters(parameters *DeleteDatabaseParameters) *DeleteDatabasesOperation
func (*DeleteDatabasesOperation) GetCommand ¶
func (o *DeleteDatabasesOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type DeleteDocumentCommand ¶
type DeleteDocumentCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewDeleteDocumentCommand ¶
func NewDeleteDocumentCommand(id string, changeVector *string) *DeleteDocumentCommand
func (*DeleteDocumentCommand) CreateRequest ¶
func (c *DeleteDocumentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type DeleteIndexCommand ¶
type DeleteIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewDeleteIndexCommand ¶
func NewDeleteIndexCommand(indexName string) (*DeleteIndexCommand, error)
func (*DeleteIndexCommand) CreateRequest ¶
func (c *DeleteIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type DeleteIndexOperation ¶
type DeleteIndexOperation struct { Command *DeleteIndexCommand // contains filtered or unexported fields }
func NewDeleteIndexOperation ¶
func NewDeleteIndexOperation(indexName string) *DeleteIndexOperation
func (*DeleteIndexOperation) GetCommand ¶
func (o *DeleteIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type DeleteSubscriptionCommand ¶
type DeleteSubscriptionCommand struct { RavenCommandBase // contains filtered or unexported fields }
DeleteSubscriptionCommand describes "delete subscription" command
func (*DeleteSubscriptionCommand) CreateRequest ¶
func (c *DeleteSubscriptionCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type DisableIndexCommand ¶
type DisableIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewDisableIndexCommand ¶
func NewDisableIndexCommand(indexName string) (*DisableIndexCommand, error)
func (*DisableIndexCommand) CreateRequest ¶
func (c *DisableIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type DisableIndexOperation ¶
type DisableIndexOperation struct { Command *DisableIndexCommand // contains filtered or unexported fields }
func NewDisableIndexOperation ¶
func NewDisableIndexOperation(indexName string) (*DisableIndexOperation, error)
func (*DisableIndexOperation) GetCommand ¶
func (o *DisableIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type DocumentChange ¶
type DocumentChange struct { Type DocumentChangeTypes ID string CollectionName string ChangeVector *string }
DocumentChange describes a change to the document. Can be used as DatabaseChange.
func (*DocumentChange) String ¶
func (c *DocumentChange) String() string
type DocumentChangeTypes ¶
type DocumentChangeTypes = string
type DocumentConflictError ¶
type DocumentConflictError struct { ConflictError DocID string LargestEtag int64 }
DocumentConflictError represents document conflict error from the server
func (*DocumentConflictError) Error ¶
func (e *DocumentConflictError) Error() string
Error makes it conform to error interface
func (*DocumentConflictError) WrappedError ¶
func (e *DocumentConflictError) WrappedError() error
hackish way to get a wrapped error
type DocumentConventions ¶
type DocumentConventions struct { MaxNumberOfRequestsPerSession int // timeout for wait to server Timeout time.Duration UseOptimisticConcurrency bool // JsonDefaultMethod = DocumentConventions.json_default MaxLengthOfQueryUsingGetURL int IdentityPartsSeparator string // If set to 'true' then it will return an error when any query is performed (in session) // without explicit page size set RaiseIfQueryPageSizeIsNotSet bool // TODO: rename to ErrorIfQueryPageSizeIsNotSet // allows overriding entity -> collection name logic FindCollectionName func(interface{}) string ReadBalanceBehavior ReadBalanceBehavior // if true, will return error if page size is not set ErrorIfQueryPageSizeIsNotSet bool // contains filtered or unexported fields }
DocumentConventions describes document conventions
func NewDocumentConventions ¶
func NewDocumentConventions() *DocumentConventions
NewDocumentConventions creates DocumentConventions with default values
func (*DocumentConventions) Clone ¶
func (c *DocumentConventions) Clone() *DocumentConventions
func (*DocumentConventions) Freeze ¶
func (c *DocumentConventions) Freeze()
func (*DocumentConventions) GenerateDocumentID ¶
func (c *DocumentConventions) GenerateDocumentID(databaseName string, entity interface{}) (string, error)
Generates the document id.
func (*DocumentConventions) GetDocumentIDGenerator ¶
func (c *DocumentConventions) GetDocumentIDGenerator() DocumentIDGeneratorFunc
func (*DocumentConventions) GetIdentityPartsSeparator ¶
func (c *DocumentConventions) GetIdentityPartsSeparator() string
func (*DocumentConventions) GetIdentityProperty ¶
func (c *DocumentConventions) GetIdentityProperty(clazz reflect.Type) string
returns "" if no identity property
func (*DocumentConventions) GetTransformClassCollectionNameToDocumentIdPrefix ¶
func (c *DocumentConventions) GetTransformClassCollectionNameToDocumentIdPrefix() func(string) string
func (*DocumentConventions) IsDisableTopologyUpdates ¶
func (c *DocumentConventions) IsDisableTopologyUpdates() bool
func (*DocumentConventions) SetDisableTopologyUpdates ¶
func (c *DocumentConventions) SetDisableTopologyUpdates(disable bool)
func (*DocumentConventions) SetDocumentIDGenerator ¶
func (c *DocumentConventions) SetDocumentIDGenerator(documentIDGenerator DocumentIDGeneratorFunc)
func (*DocumentConventions) TryConvertValueForQuery ¶
func (c *DocumentConventions) TryConvertValueForQuery(fieldName string, value interface{}, forRange bool, stringValue *string) bool
func (*DocumentConventions) UpdateFrom ¶
func (c *DocumentConventions) UpdateFrom(configuration *ClientConfiguration)
type DocumentDoesNotExistError ¶
type DocumentDoesNotExistError struct {
RavenError
}
func (*DocumentDoesNotExistError) Error ¶
func (e *DocumentDoesNotExistError) Error() string
Error makes it conform to error interface
func (*DocumentDoesNotExistError) WrappedError ¶
func (e *DocumentDoesNotExistError) WrappedError() error
hackish way to get a wrapped error
type DocumentIDGeneratorFunc ¶
type DocumentQuery ¶
type DocumentQuery struct {
// contains filtered or unexported fields
}
DocumentQuery describes a query
func (*DocumentQuery) AddBeforeQueryExecutedListener ¶
func (q *DocumentQuery) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
AddBeforeQueryExecutedListener adds a listener that will be called before query is executed
func (*DocumentQuery) AddOrder ¶
func (q *DocumentQuery) AddOrder(fieldName string, descending bool) *DocumentQuery
func (*DocumentQuery) AddOrderWithOrdering ¶
func (q *DocumentQuery) AddOrderWithOrdering(fieldName string, descending bool, ordering OrderingType) *DocumentQuery
func (*DocumentQuery) AddParameter ¶
func (q *DocumentQuery) AddParameter(name string, value interface{}) *DocumentQuery
func (*DocumentQuery) AggregateByFacet ¶
func (q *DocumentQuery) AggregateByFacet(facet FacetBase) *AggregationDocumentQuery
AggregateByFacet aggregates the query by a facet
func (*DocumentQuery) AggregateByFacets ¶
func (q *DocumentQuery) AggregateByFacets(facets ...*Facet) *AggregationDocumentQuery
AggregateByFacets aggregates the query by facets
func (*DocumentQuery) AggregateUsing ¶
func (q *DocumentQuery) AggregateUsing(facetSetupDocumentID string) *AggregationDocumentQuery
AggregateUsing aggregates the query by facet setup
func (*DocumentQuery) AndAlso ¶
func (q *DocumentQuery) AndAlso() *DocumentQuery
func (*DocumentQuery) Boost ¶
func (q *DocumentQuery) Boost(boost float64) *DocumentQuery
func (*DocumentQuery) CloseSubclause ¶
func (q *DocumentQuery) CloseSubclause() *DocumentQuery
CloseSubclause closes a query sub-clause
func (*DocumentQuery) ContainsAll ¶
func (q *DocumentQuery) ContainsAll(fieldName string, values []interface{}) *DocumentQuery
func (*DocumentQuery) ContainsAny ¶
func (q *DocumentQuery) ContainsAny(fieldName string, values []interface{}) *DocumentQuery
func (DocumentQuery) CountLazily ¶
CountLazily returns a lazy operation that returns number of results in a query. It'll set *count to number of results after Lazy.GetResult() is called. results should be of type []<type> and is only provided so that we know this is a query for <type> TODO: figure out better API.
func (*DocumentQuery) Distinct ¶
func (q *DocumentQuery) Distinct() *DocumentQuery
Distinct marks query as distinct
func (*DocumentQuery) Exact ¶
func (q *DocumentQuery) Exact() *DocumentQuery
Exact marks previous Where statement (e.g. WhereEquals or WhereLucene) as exact
func (DocumentQuery) First ¶
func (q DocumentQuery) First(result interface{}) error
First runs a query and returns a first result.
func (*DocumentQuery) Fuzzy ¶
func (q *DocumentQuery) Fuzzy(fuzzy float64) *DocumentQuery
func (DocumentQuery) GetIndexQuery ¶
func (q DocumentQuery) GetIndexQuery() (*IndexQuery, error)
func (DocumentQuery) GetResults ¶
func (q DocumentQuery) GetResults(results interface{}) error
GetResults executes the query and sets results to returned values. results should be of type *[]<type>
func (*DocumentQuery) GroupBy ¶
func (q *DocumentQuery) GroupBy(fieldName string, fieldNames ...string) *GroupByDocumentQuery
GroupBy makes a query grouped by fields
func (*DocumentQuery) GroupByFieldWithMethod ¶
func (q *DocumentQuery) GroupByFieldWithMethod(field *GroupBy, fields ...*GroupBy) *GroupByDocumentQuery
GroupByFieldWithMethod makes a query grouped by fields and also allows specifying method of grouping for each field
func (*DocumentQuery) Include ¶
func (q *DocumentQuery) Include(path string) *DocumentQuery
func (*DocumentQuery) Intersect ¶
func (q *DocumentQuery) Intersect() *DocumentQuery
func (*DocumentQuery) MoreLikeThis ¶
func (q *DocumentQuery) MoreLikeThis(moreLikeThis MoreLikeThisBase) *DocumentQuery
func (*DocumentQuery) MoreLikeThisWithBuilder ¶
func (q *DocumentQuery) MoreLikeThisWithBuilder(builder func(IMoreLikeThisBuilderForDocumentQuery)) *DocumentQuery
func (*DocumentQuery) NoCaching ¶
func (q *DocumentQuery) NoCaching() *DocumentQuery
func (*DocumentQuery) NoTracking ¶
func (q *DocumentQuery) NoTracking() *DocumentQuery
func (*DocumentQuery) Not ¶
func (q *DocumentQuery) Not() *DocumentQuery
func (*DocumentQuery) OpenSubclause ¶
func (q *DocumentQuery) OpenSubclause() *DocumentQuery
OpenSubclause opens a query sub-clause
func (*DocumentQuery) OrElse ¶
func (q *DocumentQuery) OrElse() *DocumentQuery
func (*DocumentQuery) OrderBy ¶
func (q *DocumentQuery) OrderBy(field string) *DocumentQuery
OrderBy orders query results by a field
func (*DocumentQuery) OrderByDescending ¶
func (q *DocumentQuery) OrderByDescending(field string) *DocumentQuery
OrderByDescending orders query by a field in descending order
func (*DocumentQuery) OrderByDescendingWithOrdering ¶
func (q *DocumentQuery) OrderByDescendingWithOrdering(field string, ordering OrderingType) *DocumentQuery
OrderByDescendingWithOrdering orders query by ordering in descending order
func (*DocumentQuery) OrderByDistanceDescendingLatLong ¶
func (q *DocumentQuery) OrderByDistanceDescendingLatLong(fieldName string, latitude float64, longitude float64) *DocumentQuery
func (*DocumentQuery) OrderByDistanceDescendingLatLongDynamic ¶
func (q *DocumentQuery) OrderByDistanceDescendingLatLongDynamic(field DynamicSpatialField, latitude float64, longitude float64) *DocumentQuery
func (*DocumentQuery) OrderByDistanceDescendingWkt ¶
func (q *DocumentQuery) OrderByDistanceDescendingWkt(fieldName string, shapeWkt string) *DocumentQuery
func (*DocumentQuery) OrderByDistanceDescendingWktDynamic ¶
func (q *DocumentQuery) OrderByDistanceDescendingWktDynamic(field DynamicSpatialField, shapeWkt string) *DocumentQuery
func (*DocumentQuery) OrderByDistanceLatLong ¶
func (q *DocumentQuery) OrderByDistanceLatLong(fieldName string, latitude float64, longitude float64) *DocumentQuery
func (*DocumentQuery) OrderByDistanceLatLongDynamic ¶
func (q *DocumentQuery) OrderByDistanceLatLongDynamic(field DynamicSpatialField, latitude float64, longitude float64) *DocumentQuery
OrderByDistanceLatLongDynamic orders a given field by lat / long
func (*DocumentQuery) OrderByDistanceWkt ¶
func (q *DocumentQuery) OrderByDistanceWkt(fieldName string, shapeWkt string) *DocumentQuery
func (*DocumentQuery) OrderByDistanceWktDynamic ¶
func (q *DocumentQuery) OrderByDistanceWktDynamic(field DynamicSpatialField, shapeWkt string) *DocumentQuery
func (*DocumentQuery) OrderByScore ¶
func (q *DocumentQuery) OrderByScore() *DocumentQuery
OrderByScore orders results of the query by score
func (*DocumentQuery) OrderByScoreDescending ¶
func (q *DocumentQuery) OrderByScoreDescending() *DocumentQuery
OrderByScoreDescending orders results of the query by score in descending order
func (*DocumentQuery) OrderByWithOrdering ¶
func (q *DocumentQuery) OrderByWithOrdering(field string, ordering OrderingType) *DocumentQuery
OrderByWithOrdering orders query results by ordering
func (*DocumentQuery) Proximity ¶
func (q *DocumentQuery) Proximity(proximity int) *DocumentQuery
func (*DocumentQuery) RandomOrdering ¶
func (q *DocumentQuery) RandomOrdering() *DocumentQuery
func (*DocumentQuery) RandomOrderingWithSeed ¶
func (q *DocumentQuery) RandomOrderingWithSeed(seed string) *DocumentQuery
func (*DocumentQuery) RelatesToShape ¶
func (q *DocumentQuery) RelatesToShape(fieldName string, shapeWkt string, relation SpatialRelation) *DocumentQuery
func (*DocumentQuery) RelatesToShapeWithError ¶
func (q *DocumentQuery) RelatesToShapeWithError(fieldName string, shapeWkt string, relation SpatialRelation, distanceErrorPct float64) *DocumentQuery
func (*DocumentQuery) RemoveBeforeQueryExecutedListener ¶
func (q *DocumentQuery) RemoveBeforeQueryExecutedListener(idx int) *DocumentQuery
RemoveBeforeQueryExecutedListener removes a listener registered with AddBeforeQueryExecutedListener
func (*DocumentQuery) Search ¶
func (q *DocumentQuery) Search(fieldName string, searchTerms string) *DocumentQuery
func (*DocumentQuery) SearchWithOperator ¶
func (q *DocumentQuery) SearchWithOperator(fieldName string, searchTerms string, operator SearchOperator) *DocumentQuery
func (*DocumentQuery) SelectFields ¶
func (q *DocumentQuery) SelectFields(projectionType reflect.Type, fieldsIn ...string) *DocumentQuery
SelectFields limits the returned values to one or more fields of the queried type.
func (*DocumentQuery) SelectFieldsWithQueryData ¶
func (q *DocumentQuery) SelectFieldsWithQueryData(projectionType reflect.Type, queryData *QueryData) *DocumentQuery
SelectFieldsWithQueryData limits the returned values to one or more fields of the queried type.
func (DocumentQuery) Single ¶
func (q DocumentQuery) Single(result interface{}) error
Single runs a query that expects only a single result. If there is more than one result, it returns IllegalStateError.
func (*DocumentQuery) Skip ¶
func (q *DocumentQuery) Skip(count int) *DocumentQuery
func (*DocumentQuery) Spatial2 ¶
func (q *DocumentQuery) Spatial2(field DynamicSpatialField, clause func(*SpatialCriteriaFactory) SpatialCriteria) *DocumentQuery
func (*DocumentQuery) Spatial3 ¶
func (q *DocumentQuery) Spatial3(fieldName string, clause func(*SpatialCriteriaFactory) SpatialCriteria) *DocumentQuery
func (*DocumentQuery) Statistics ¶
func (q *DocumentQuery) Statistics(stats **QueryStatistics) *DocumentQuery
func (*DocumentQuery) SuggestUsing ¶
func (q *DocumentQuery) SuggestUsing(suggestion SuggestionBase) *SuggestionDocumentQuery
func (*DocumentQuery) Take ¶
func (q *DocumentQuery) Take(count int) *DocumentQuery
func (*DocumentQuery) UsingDefaultOperator ¶
func (q *DocumentQuery) UsingDefaultOperator(queryOperator QueryOperator) *DocumentQuery
func (*DocumentQuery) WaitForNonStaleResults ¶
func (q *DocumentQuery) WaitForNonStaleResults(waitTimeout time.Duration) *DocumentQuery
WaitForNonStaleResults waits for non-stale results for a given waitTimeout. Timeout of 0 means default timeout.
func (*DocumentQuery) Where ¶
func (q *DocumentQuery) Where(fieldName string, op string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereBetween ¶
func (q *DocumentQuery) WhereBetween(fieldName string, start interface{}, end interface{}) *DocumentQuery
func (*DocumentQuery) WhereEndsWith ¶
func (q *DocumentQuery) WhereEndsWith(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereEquals ¶
func (q *DocumentQuery) WhereEquals(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereEqualsWithMethodCall ¶
func (q *DocumentQuery) WhereEqualsWithMethodCall(fieldName string, method MethodCall) *DocumentQuery
func (*DocumentQuery) WhereEqualsWithParams ¶
func (q *DocumentQuery) WhereEqualsWithParams(whereParams *whereParams) *DocumentQuery
func (*DocumentQuery) WhereExists ¶
func (q *DocumentQuery) WhereExists(fieldName string) *DocumentQuery
func (*DocumentQuery) WhereGreaterThan ¶
func (q *DocumentQuery) WhereGreaterThan(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereGreaterThanOrEqual ¶
func (q *DocumentQuery) WhereGreaterThanOrEqual(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereIn ¶
func (q *DocumentQuery) WhereIn(fieldName string, values []interface{}) *DocumentQuery
func (*DocumentQuery) WhereLessThan ¶
func (q *DocumentQuery) WhereLessThan(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereLessThanOrEqual ¶
func (q *DocumentQuery) WhereLessThanOrEqual(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereLucene ¶
func (q *DocumentQuery) WhereLucene(fieldName string, whereClause string) *DocumentQuery
func (*DocumentQuery) WhereNotEquals ¶
func (q *DocumentQuery) WhereNotEquals(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WhereNotEqualsWithMethod ¶
func (q *DocumentQuery) WhereNotEqualsWithMethod(fieldName string, method MethodCall) *DocumentQuery
func (*DocumentQuery) WhereNotEqualsWithParams ¶
func (q *DocumentQuery) WhereNotEqualsWithParams(whereParams *whereParams) *DocumentQuery
func (*DocumentQuery) WhereRegex ¶
func (q *DocumentQuery) WhereRegex(fieldName string, pattern string) *DocumentQuery
func (*DocumentQuery) WhereStartsWith ¶
func (q *DocumentQuery) WhereStartsWith(fieldName string, value interface{}) *DocumentQuery
func (*DocumentQuery) WithinRadiusOf ¶
func (q *DocumentQuery) WithinRadiusOf(fieldName string, radius float64, latitude float64, longitude float64) *DocumentQuery
func (*DocumentQuery) WithinRadiusOfWithUnits ¶
func (q *DocumentQuery) WithinRadiusOfWithUnits(fieldName string, radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits) *DocumentQuery
func (*DocumentQuery) WithinRadiusOfWithUnitsAndError ¶
func (q *DocumentQuery) WithinRadiusOfWithUnitsAndError(fieldName string, radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits, distanceErrorPct float64) *DocumentQuery
type DocumentQueryCustomization ¶
type DocumentQueryCustomization struct {
// contains filtered or unexported fields
}
DocumentQueryCustomization allows customizing query
func (*DocumentQueryCustomization) AddAfterQueryExecutedListener ¶
func (d *DocumentQueryCustomization) AddAfterQueryExecutedListener(action func(*QueryResult)) int
AddAfterQueryExecutedListener adds a callback to get the results of the query
func (*DocumentQueryCustomization) AddAfterStreamExecutedCallback ¶
func (d *DocumentQueryCustomization) AddAfterStreamExecutedCallback(action func(map[string]interface{})) int
AddAfterStreamExecutedCallback adds a callback to get stream result
func (*DocumentQueryCustomization) AddBeforeQueryExecutedListener ¶
func (d *DocumentQueryCustomization) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
AddBeforeQueryExecutedListener allows you to modify index query before it's executed
func (*DocumentQueryCustomization) GetQueryOperation ¶
func (d *DocumentQueryCustomization) GetQueryOperation() *queryOperation
GetQueryOperation returns raw query operation that will be sent to the server
func (*DocumentQueryCustomization) NoCaching ¶
func (d *DocumentQueryCustomization) NoCaching()
NoCaching disables caching for query results
func (*DocumentQueryCustomization) NoTracking ¶
func (d *DocumentQueryCustomization) NoTracking()
NoTracking disables tracking for quried entities by Raven's Unit of Work Using this option prevents hodling query results in memory
func (*DocumentQueryCustomization) RandomOrdering ¶
func (d *DocumentQueryCustomization) RandomOrdering()
RandomOrdering orders search results randomly.
func (*DocumentQueryCustomization) RandomOrderingWithSeed ¶
func (d *DocumentQueryCustomization) RandomOrderingWithSeed(seed string)
RandomOrdering orders search results randomly with a given seed. This is useful for repeatable random queries
func (*DocumentQueryCustomization) RemoveAfterQueryExecutedListener ¶
func (d *DocumentQueryCustomization) RemoveAfterQueryExecutedListener(idx int)
RemoveAfterQueryExecutedListener removes callback added with AddAfterQueryExecutedListener
func (*DocumentQueryCustomization) RemoveAfterStreamExecutedCallback ¶
func (d *DocumentQueryCustomization) RemoveAfterStreamExecutedCallback(idx int)
RemoveAfterStreamExecutedCallback remove callback added with AddAfterStreamExecutedCallback
func (*DocumentQueryCustomization) RemoveBeforeQueryExecutedListener ¶
func (d *DocumentQueryCustomization) RemoveBeforeQueryExecutedListener(idx int)
RemoveBeforeQueryExecutedListener removes listener added with AddBeforeQueryExecutedListener
func (*DocumentQueryCustomization) WaitForNonStaleResults ¶
func (d *DocumentQueryCustomization) WaitForNonStaleResults(waitTimeout time.Duration)
WaitForNonStaleResults instructs the query to wait for non results. waitTimeout of 0 means infinite timeout This shouldn't be used outside of unit tests unless you are well aware of the implications
type DocumentQueryOptions ¶
type DocumentQueryOptions struct { // CollectionName and Type are mutually exclusive // if Collection is empty string we'll derive name of the collection // from Type CollectionName string Type reflect.Type // name of the index used for search query // if set, CollectionName and Type should not be set IndexName string IsMapReduce bool // contains filtered or unexported fields }
DocumentQueryOptions describes options for creating a query
type DocumentSession ¶
type DocumentSession struct { *InMemoryDocumentSessionOperations // contains filtered or unexported fields }
DocumentSession is a Unit of Work for accessing RavenDB server
func NewDocumentSession ¶
func NewDocumentSession(dbName string, documentStore *DocumentStore, id string, re *RequestExecutor) *DocumentSession
NewDocumentSession creates a new DocumentSession
func (*DocumentSession) Advanced ¶
func (s *DocumentSession) Advanced() *AdvancedSessionOperations
func (*DocumentSession) Attachments ¶
func (s *DocumentSession) Attachments() *AttachmentsSessionOperations
func (*DocumentSession) Eagerly ¶
func (s *DocumentSession) Eagerly() *EagerSessionOperations
func (*DocumentSession) Exists ¶
func (s *DocumentSession) Exists(id string) (bool, error)
Exists returns true if an entity with a given id exists in the database
func (*DocumentSession) Include ¶
func (s *DocumentSession) Include(path string) *MultiLoaderWithInclude
func (*DocumentSession) Increment ¶
func (s *DocumentSession) Increment(entity interface{}, path string, valueToAdd interface{}) error
Increment increments member identified by path in an entity by a given valueToAdd (can be negative, to subtract)
func (*DocumentSession) IncrementByID ¶
func (s *DocumentSession) IncrementByID(id string, path string, valueToAdd interface{}) error
IncrementByID increments member identified by path in an entity identified by id by a given valueToAdd (can be negative, to subtract)
func (*DocumentSession) Lazily ¶
func (s *DocumentSession) Lazily() *LazySessionOperations
func (*DocumentSession) Load ¶
func (s *DocumentSession) Load(result interface{}, id string) error
Load loads an entity with a given id and sets result to it. result should be of type **<struct> or *map[string]interface{}
func (*DocumentSession) LoadIntoStream ¶
func (s *DocumentSession) LoadIntoStream(ids []string, output io.Writer) error
LoadIntoStream loads entities identified by ids and writes them (in JSON form) to output
func (*DocumentSession) LoadMulti ¶
func (s *DocumentSession) LoadMulti(results interface{}, ids []string) error
LoadMulti loads multiple values with given ids into results, which should be a map from string (id) to pointer to struct
func (*DocumentSession) LoadStartingWith ¶
func (s *DocumentSession) LoadStartingWith(results interface{}, args *StartsWithArgs) error
func (*DocumentSession) LoadStartingWithIntoStream ¶
func (s *DocumentSession) LoadStartingWithIntoStream(output io.Writer, args *StartsWithArgs) error
func (*DocumentSession) Patch ¶
func (s *DocumentSession) Patch(entity interface{}, path string, value interface{}) error
Patch updates entity by changing part identified by path to a given value
func (*DocumentSession) PatchArray ¶
func (s *DocumentSession) PatchArray(entity interface{}, pathToArray string, arrayAdder func(*JavaScriptArray)) error
PatchArray updates an array value of document under a given path. Modify the array inside arrayAdder function
func (*DocumentSession) PatchArrayByID ¶
func (s *DocumentSession) PatchArrayByID(id string, pathToArray string, arrayAdder func(*JavaScriptArray)) error
func (*DocumentSession) PatchByID ¶
func (s *DocumentSession) PatchByID(id string, path string, value interface{}) error
PatchByID updates entity identified by id by changing part identified by path to a given value
func (*DocumentSession) Query ¶
func (s *DocumentSession) Query(opts *DocumentQueryOptions) *DocumentQuery
Query return a new DocumentQuery
func (*DocumentSession) QueryCollection ¶
func (s *DocumentSession) QueryCollection(collectionName string) *DocumentQuery
QueryCollection creates a new query over documents of a given collection
func (*DocumentSession) QueryCollectionForType ¶
func (s *DocumentSession) QueryCollectionForType(typ reflect.Type) *DocumentQuery
QueryCollectionForType creates a new query over documents of a given type
func (*DocumentSession) QueryIndex ¶
func (s *DocumentSession) QueryIndex(indexName string) *DocumentQuery
QueryIndex creates a new query in a index with a given name
func (*DocumentSession) RawQuery ¶
func (s *DocumentSession) RawQuery(rawQuery string) *RawDocumentQuery
RawQuery returns new DocumentQuery representing a raw query
func (*DocumentSession) Refresh ¶
func (s *DocumentSession) Refresh(entity interface{}) error
Refresh reloads information about a given entity in the session from the database
func (*DocumentSession) Revisions ¶
func (s *DocumentSession) Revisions() *RevisionsSessionOperations
func (*DocumentSession) SaveChanges ¶
func (s *DocumentSession) SaveChanges() error
SaveChanges saves changes queued in memory to the database
func (*DocumentSession) Stream ¶
func (s *DocumentSession) Stream(args *StartsWithArgs) (*StreamIterator, error)
Stream starts an iteration and returns StreamIterator
func (*DocumentSession) StreamQuery ¶
func (s *DocumentSession) StreamQuery(query *DocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
StreamQuery starts a streaming query and returns iterator for results. If streamQueryStats is provided, it'll be filled with information about query statistics.
func (*DocumentSession) StreamQueryInto ¶
func (s *DocumentSession) StreamQueryInto(query *DocumentQuery, output io.Writer) error
StreamQueryInto starts a streaming query that will write the results (in JSON format) to output
func (*DocumentSession) StreamRawQuery ¶
func (s *DocumentSession) StreamRawQuery(query *RawDocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error)
StreamRawQuery starts a raw streaming query and returns iterator for results. If streamQueryStats is provided, it'll be filled with information about query statistics.
func (*DocumentSession) StreamRawQueryInto ¶
func (s *DocumentSession) StreamRawQueryInto(query *RawDocumentQuery, output io.Writer) error
StreamRawQueryInto starts a raw streaming query that will write the results (in JSON format) to output
type DocumentSessionAttachments ¶
type DocumentSessionAttachments struct {
*DocumentSessionAttachmentsBase
}
func NewDocumentSessionAttachments ¶
func NewDocumentSessionAttachments(session *InMemoryDocumentSessionOperations) *DocumentSessionAttachments
func (*DocumentSessionAttachments) Exists ¶
func (s *DocumentSessionAttachments) Exists(documentID string, name string) (bool, error)
func (*DocumentSessionAttachments) Get ¶
func (s *DocumentSessionAttachments) Get(entity interface{}, name string) (*AttachmentResult, error)
func (*DocumentSessionAttachments) GetByID ¶
func (s *DocumentSessionAttachments) GetByID(documentID string, name string) (*AttachmentResult, error)
func (*DocumentSessionAttachments) GetRevision ¶
func (s *DocumentSessionAttachments) GetRevision(documentID string, name string, changeVector *string) (*AttachmentResult, error)
type DocumentSessionAttachmentsBase ¶
type DocumentSessionAttachmentsBase struct {
*AdvancedSessionExtensionBase
}
func NewDocumentSessionAttachmentsBase ¶
func NewDocumentSessionAttachmentsBase(session *InMemoryDocumentSessionOperations) *DocumentSessionAttachmentsBase
func (*DocumentSessionAttachmentsBase) Delete ¶
func (s *DocumentSessionAttachmentsBase) Delete(entity interface{}, name string) error
Delete deletes a given entity TODO: support **struct or return good error message
func (*DocumentSessionAttachmentsBase) DeleteByID ¶
func (s *DocumentSessionAttachmentsBase) DeleteByID(documentID string, name string) error
Delete deletes entity with a given i
func (*DocumentSessionAttachmentsBase) GetNames ¶
func (s *DocumentSessionAttachmentsBase) GetNames(entity interface{}) ([]*AttachmentName, error)
type DocumentSessionRevisions ¶
type DocumentSessionRevisions struct {
*AdvancedSessionExtensionBase
}
DocumentSessionRevisions represents revisions operations
func (*DocumentSessionRevisions) Get ¶
func (r *DocumentSessionRevisions) Get(result interface{}, changeVector string) error
func (*DocumentSessionRevisions) GetFor ¶
func (r *DocumentSessionRevisions) GetFor(results interface{}, id string) error
func (*DocumentSessionRevisions) GetForPaged ¶
func (r *DocumentSessionRevisions) GetForPaged(results interface{}, id string, start int, pageSize int) error
func (*DocumentSessionRevisions) GetForStartAt ¶
func (r *DocumentSessionRevisions) GetForStartAt(results interface{}, id string, start int) error
func (*DocumentSessionRevisions) GetMetadataFor ¶
func (r *DocumentSessionRevisions) GetMetadataFor(id string) ([]*MetadataAsDictionary, error)
func (*DocumentSessionRevisions) GetMetadataForPaged ¶
func (r *DocumentSessionRevisions) GetMetadataForPaged(id string, start int, pageSize int) ([]*MetadataAsDictionary, error)
func (*DocumentSessionRevisions) GetMetadataForStartAt ¶
func (r *DocumentSessionRevisions) GetMetadataForStartAt(id string, start int) ([]*MetadataAsDictionary, error)
func (*DocumentSessionRevisions) GetRevisions ¶
func (r *DocumentSessionRevisions) GetRevisions(results interface{}, changeVectors []string) error
type DocumentStore ¶
type DocumentStore struct { Certificate *tls.Certificate TrustStore *x509.Certificate // contains filtered or unexported fields }
DocumentStore represents a database
func NewDocumentStore ¶
func NewDocumentStore(urls []string, database string) *DocumentStore
func (*DocumentStore) AddAfterCloseListener ¶
func (s *DocumentStore) AddAfterCloseListener(fn func(*DocumentStore)) int
func (*DocumentStore) AddAfterSaveChangesListener ¶
func (s *DocumentStore) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
AddAfterSaveChangesListener registers a function that will be called before saving changes. It'll be registered with every new session. Returns listener id that can be passed to RemoveAfterSaveChangesListener to unregister the listener.
func (*DocumentStore) AddBeforeCloseListener ¶
func (s *DocumentStore) AddBeforeCloseListener(fn func(*DocumentStore)) int
func (*DocumentStore) AddBeforeDeleteListener ¶
func (s *DocumentStore) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
AddBeforeDeleteListener registers a function that will be called before deleting an entity. It'll be registered with every new session. Returns listener id that can be passed to RemoveBeforeDeleteListener to unregister the listener.
func (*DocumentStore) AddBeforeQueryListener ¶
func (s *DocumentStore) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
AddBeforeQueryListener registers a function that will be called before running a query. It allows customizing query via DocumentQueryCustomization. It'll be registered with every new session. Returns listener id that can be passed to RemoveBeforeQueryListener to unregister the listener.
func (*DocumentStore) AddBeforeStoreListener ¶
func (s *DocumentStore) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
AddBeforeStoreStoreListener registers a function that will be called before storing ab entity. It'll be registered with every new session. Returns listener id that can be passed to RemoveBeforeStoreListener to unregister the listener.
func (*DocumentStore) AggressivelyCache ¶
func (s *DocumentStore) AggressivelyCache(database string) (CancelFunc, error)
func (*DocumentStore) AggressivelyCacheFor ¶
func (s *DocumentStore) AggressivelyCacheFor(cacheDuration time.Duration) (CancelFunc, error)
func (*DocumentStore) AggressivelyCacheForDatabase ¶
func (s *DocumentStore) AggressivelyCacheForDatabase(cacheDuration time.Duration, database string) (CancelFunc, error)
func (*DocumentStore) BulkInsert ¶
func (s *DocumentStore) BulkInsert(database string) *BulkInsertOperation
func (*DocumentStore) Changes ¶
func (s *DocumentStore) Changes(database string) *DatabaseChanges
func (*DocumentStore) DisableAggressiveCaching ¶
func (s *DocumentStore) DisableAggressiveCaching(databaseName string) *RestoreCaching
func (*DocumentStore) ExecuteIndex ¶
func (s *DocumentStore) ExecuteIndex(task *IndexCreationTask, database string) error
func (*DocumentStore) ExecuteIndexes ¶
func (s *DocumentStore) ExecuteIndexes(tasks []*IndexCreationTask, database string) error
func (*DocumentStore) GetConventions ¶
func (s *DocumentStore) GetConventions() *DocumentConventions
GetConventions returns DocumentConventions
func (*DocumentStore) GetDatabase ¶
func (s *DocumentStore) GetDatabase() string
func (*DocumentStore) GetIdentifier ¶
func (s *DocumentStore) GetIdentifier() string
Get an identifier of the store. For debugging / testing.
func (*DocumentStore) GetLastDatabaseChangesStateError ¶
func (s *DocumentStore) GetLastDatabaseChangesStateError(database string) error
func (*DocumentStore) GetRequestExecutor ¶
func (s *DocumentStore) GetRequestExecutor(database string) *RequestExecutor
GetRequestExecutor gets a request executor. database is optional
func (*DocumentStore) GetUrls ¶
func (s *DocumentStore) GetUrls() []string
GetUrls returns urls of all RavenDB nodes
func (*DocumentStore) Initialize ¶
func (s *DocumentStore) Initialize() error
Initialize initializes document Store, Must be called before executing any operation.
func (*DocumentStore) Maintenance ¶
func (s *DocumentStore) Maintenance() *MaintenanceOperationExecutor
func (*DocumentStore) OpenSession ¶
func (s *DocumentStore) OpenSession(database string) (*DocumentSession, error)
OpenSession opens a new session to document Store. If database is not given, we'll use store's database name
func (*DocumentStore) OpenSessionWithOptions ¶
func (s *DocumentStore) OpenSessionWithOptions(options *SessionOptions) (*DocumentSession, error)
func (*DocumentStore) Operations ¶
func (s *DocumentStore) Operations() *OperationExecutor
func (*DocumentStore) RemoveAfterCloseListener ¶
func (s *DocumentStore) RemoveAfterCloseListener(idx int)
func (*DocumentStore) RemoveAfterSaveChangesListener ¶
func (s *DocumentStore) RemoveAfterSaveChangesListener(handlerID int)
RemoveAfterSaveChangesListener removes a listener given id returned by AddAfterSaveChangesListener
func (*DocumentStore) RemoveBeforeCloseListener ¶
func (s *DocumentStore) RemoveBeforeCloseListener(idx int)
func (*DocumentStore) RemoveBeforeDeleteListener ¶
func (s *DocumentStore) RemoveBeforeDeleteListener(handlerID int)
RemoveBeforeDeleteListener removes a listener given id returned by AddBeforeDeleteListener
func (*DocumentStore) RemoveBeforeQueryListener ¶
func (s *DocumentStore) RemoveBeforeQueryListener(handlerID int)
RemoveBeforeQueryListener removes a listener given id returned by AddBeforeQueryListener
func (*DocumentStore) RemoveBeforeStoreListener ¶
func (s *DocumentStore) RemoveBeforeStoreListener(handlerID int)
RemoveBeforeStoreListener removes a listener given id returned by AddBeforeStoreListener
func (*DocumentStore) SetConventions ¶
func (s *DocumentStore) SetConventions(conventions *DocumentConventions)
SetConventions sets DocumentConventions
func (*DocumentStore) SetDatabase ¶
func (s *DocumentStore) SetDatabase(database string)
func (*DocumentStore) SetIdentifier ¶
func (s *DocumentStore) SetIdentifier(identifier string)
func (*DocumentStore) SetUrls ¶
func (s *DocumentStore) SetUrls(urls []string)
SetUrls sets initial urls of RavenDB nodes
func (*DocumentStore) Subscriptions ¶
func (s *DocumentStore) Subscriptions() *DocumentSubscriptions
Subscriptions returns DocumentSubscriptions which allows subscribing to changes in store
type DocumentSubscriptions ¶
type DocumentSubscriptions struct {
// contains filtered or unexported fields
}
DocumentSubscriptions allows subscribing to changes in the store
func (*DocumentSubscriptions) Close ¶
func (s *DocumentSubscriptions) Close() error
Close closes subscriptions
func (*DocumentSubscriptions) Create ¶
func (s *DocumentSubscriptions) Create(options *SubscriptionCreationOptions, database string) (string, error)
Create creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type.
func (*DocumentSubscriptions) CreateForRevisions ¶
func (s *DocumentSubscriptions) CreateForRevisions(clazz reflect.Type, options *SubscriptionCreationOptions, database string) (string, error)
CreateForRevisions creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type.
func (*DocumentSubscriptions) CreateForType ¶
func (s *DocumentSubscriptions) CreateForType(clazz reflect.Type, options *SubscriptionCreationOptions, database string) (string, error)
CreateForType creates a data subscription in a database. The subscription will expose all documents that match the specified subscription options for a given type.
func (*DocumentSubscriptions) Delete ¶
func (s *DocumentSubscriptions) Delete(name string, database string) error
Delete deletes a subscription.
func (*DocumentSubscriptions) DropConnection ¶
func (s *DocumentSubscriptions) DropConnection(name string, database string) error
DropConnection forces server to close current client subscription connection to the server
func (*DocumentSubscriptions) GetSubscriptionState ¶
func (s *DocumentSubscriptions) GetSubscriptionState(subscriptionName string, database string) (*SubscriptionState, error)
GetSubscriptionState returns subscription definition and it's current state
func (*DocumentSubscriptions) GetSubscriptionWorker ¶
func (s *DocumentSubscriptions) GetSubscriptionWorker(clazz reflect.Type, options *SubscriptionWorkerOptions, database string) (*SubscriptionWorker, error)
GetSubscriptionWorker opens a subscription and starts pulling documents since a last processed document for that subscription. The connection options determine client and server cooperation rules like document batch sizes or a timeout in a matter of which a client needs to acknowledge that batch has been processed. The acknowledgment is sent after all documents are processed by subscription's handlers.
func (*DocumentSubscriptions) GetSubscriptionWorkerForRevisions ¶
func (s *DocumentSubscriptions) GetSubscriptionWorkerForRevisions(clazz reflect.Type, options *SubscriptionWorkerOptions, database string) (*SubscriptionWorker, error)
GetSubscriptionWorkerForRevisions opens a subscription and starts pulling documents since a last processed document for that subscription. The connection options determine client and server cooperation rules like document batch sizes or a timeout in a matter of which a client needs to acknowledge that batch has been processed. The acknowledgment is sent after all documents are processed by subscription's handlers.
func (*DocumentSubscriptions) GetSubscriptions ¶
func (s *DocumentSubscriptions) GetSubscriptions(start int, take int, database string) ([]*SubscriptionState, error)
GetSubscriptions downloads a list of all existing subscriptions in a database.
type DocumentsChanges ¶
type DocumentsChanges struct { FieldOldValue interface{} FieldNewValue interface{} FieldOldType interface{} FieldNewType interface{} Change ChangeType FieldName string }
DocumentsChanges describes a change in a document
type DropSubscriptionConnectionCommand ¶
type DropSubscriptionConnectionCommand struct { RavenCommandBase // contains filtered or unexported fields }
DropSubscriptionConnectionCommand describes "drop subscription" command
func (*DropSubscriptionConnectionCommand) CreateRequest ¶
func (c *DropSubscriptionConnectionCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type Duration ¶
Duration is an alias for time.Duration that serializes to JSON in format compatible with ravendb server
func (Duration) MarshalJSON ¶
MarshalJSON converts to JSON format (as a string)
func (*Duration) UnmarshalJSON ¶
UnmarshalJSON decodes from string
type DynamicSpatialField ¶
type DynamicSpatialField interface { // ToField returns a name of the field used in queries ToField(ensureValidFieldName func(string, bool) (string, error)) (string, error) }
DynamicSpatialField is an interface for implementing name of the field to be queried
type EagerSessionOperations ¶
type EagerSessionOperations struct {
// contains filtered or unexported fields
}
func (*EagerSessionOperations) ExecuteAllPendingLazyOperations ¶
func (s *EagerSessionOperations) ExecuteAllPendingLazyOperations() (*ResponseTimeInformation, error)
type EnableIndexCommand ¶
type EnableIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewEnableIndexCommand ¶
func NewEnableIndexCommand(indexName string) (*EnableIndexCommand, error)
func (*EnableIndexCommand) CreateRequest ¶
func (c *EnableIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type EnableIndexOperation ¶
type EnableIndexOperation struct { Command *EnableIndexCommand // contains filtered or unexported fields }
func NewEnableIndexOperation ¶
func NewEnableIndexOperation(indexName string) (*EnableIndexOperation, error)
func (*EnableIndexOperation) GetCommand ¶
func (o *EnableIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type EventHandler ¶
type EventHandler interface {
// contains filtered or unexported methods
}
type ExplainQueryCommand ¶
type ExplainQueryCommand struct { RavenCommandBase Result []*ExplainQueryResult // contains filtered or unexported fields }
func NewExplainQueryCommand ¶
func NewExplainQueryCommand(conventions *DocumentConventions, indexQuery *IndexQuery) *ExplainQueryCommand
func (*ExplainQueryCommand) CreateRequest ¶
func (c *ExplainQueryCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*ExplainQueryCommand) SetResponse ¶
func (c *ExplainQueryCommand) SetResponse(response []byte, fromCache bool) error
type ExplainQueryResult ¶
type ExternalReplication ¶
type ExternalReplication struct { ReplicationNode TaskID int64 `json:"TaskId"` Name string `json:"Name"` ConnectionStringName string `json:"ConnectionStringName"` MentorName string `json:"MentorName"` }
ExternalReplication describes external replication
func NewExternalReplication ¶
func NewExternalReplication(database string, connectionStringName string) *ExternalReplication
NewExternalReplication creates ExternalReplication
type Facet ¶
type Facet struct { FacetBaseCommon FieldName string `json:"FieldName"` }
Facet describes a search facet
func (*Facet) ToFacetToken ¶
ToFacetToken returns token for this facet
type FacetAggregation ¶
type FacetAggregation = string
type FacetBase ¶
type FacetBase interface { // those are supplied by each type ToFacetToken(addQueryParameter func(interface{}) string) (*facetToken, error) // those are inherited from FacetBaseCommon SetDisplayFieldName(string) GetOptions() *FacetOptions SetOptions(*FacetOptions) GetAggregations() map[FacetAggregation]string }
type FacetBaseCommon ¶
type FacetBaseCommon struct { DisplayFieldName string `json:"DisplayFieldName,omitempty"` Options *FacetOptions `json:"Options"` Aggregations map[FacetAggregation]string `json:"Aggregations"` }
func NewFacetBaseCommon ¶
func NewFacetBaseCommon() FacetBaseCommon
func (*FacetBaseCommon) GetAggregations ¶
func (f *FacetBaseCommon) GetAggregations() map[FacetAggregation]string
func (*FacetBaseCommon) GetOptions ¶
func (f *FacetBaseCommon) GetOptions() *FacetOptions
func (*FacetBaseCommon) SetDisplayFieldName ¶
func (f *FacetBaseCommon) SetDisplayFieldName(displayFieldName string)
func (*FacetBaseCommon) SetOptions ¶
func (f *FacetBaseCommon) SetOptions(options *FacetOptions)
type FacetBuilder ¶
type FacetBuilder struct {
// contains filtered or unexported fields
}
func NewFacetBuilder ¶
func NewFacetBuilder() *FacetBuilder
func (*FacetBuilder) AllResults ¶
func (b *FacetBuilder) AllResults() *FacetBuilder
func (*FacetBuilder) AverageOn ¶
func (b *FacetBuilder) AverageOn(path string) *FacetBuilder
func (*FacetBuilder) ByField ¶
func (b *FacetBuilder) ByField(fieldName string) *FacetBuilder
func (*FacetBuilder) ByRanges ¶
func (b *FacetBuilder) ByRanges(rng *RangeBuilder, ranges ...*RangeBuilder) *FacetBuilder
func (*FacetBuilder) GetFacet ¶
func (b *FacetBuilder) GetFacet() FacetBase
func (*FacetBuilder) MaxOn ¶
func (b *FacetBuilder) MaxOn(path string) *FacetBuilder
func (*FacetBuilder) MinOn ¶
func (b *FacetBuilder) MinOn(path string) *FacetBuilder
func (*FacetBuilder) SumOn ¶
func (b *FacetBuilder) SumOn(path string) *FacetBuilder
func (*FacetBuilder) WithDisplayName ¶
func (b *FacetBuilder) WithDisplayName(displayName string) *FacetBuilder
func (*FacetBuilder) WithOptions ¶
func (b *FacetBuilder) WithOptions(options *FacetOptions) *FacetBuilder
type FacetOptions ¶
type FacetOptions struct { TermSortMode FacetTermSortMode `json:"TermSortMode"` IncludeRemainingTerms bool `json:"IncludeRemainingTerms"` Start int `json:"Start"` PageSize int `json:"PageSize"` }
FacetOptions describes options for facet
func NewFacetOptions ¶
func NewFacetOptions() *FacetOptions
NewFacetOptions returns new FacetOptions
type FacetResult ¶
type FacetResult struct { Name string Values []*FacetValue RemainingTerms []string RemainingTermsCount int RemainingHits int }
FacetResults represents results of faceted search
type FacetSetup ¶
type FacetSetup struct { ID string Facets []*Facet `json:"Facets,omitempty"` // Note: omitempty here is important. If we Send 'null', // (as opposed to Java's '[]') the server will error out // when parsing query referencing this setup RangeFacets []*RangeFacet `json:"RangeFacets,omitempty"` }
FacetSetup describes new facet setup
type FacetTermSortMode ¶
type FacetTermSortMode = string
FacetTermSortMode describes sort mode for a facet
type FacetValue ¶
type FacetValue struct { Range string Count int Sum *float64 Max *float64 Min *float64 Average *float64 }
func (*FacetValue) SetAverage ¶
func (v *FacetValue) SetAverage(average float64)
func (*FacetValue) SetMax ¶
func (v *FacetValue) SetMax(max float64)
func (*FacetValue) SetMin ¶
func (v *FacetValue) SetMin(min float64)
func (*FacetValue) SetSum ¶
func (v *FacetValue) SetSum(sum float64)
func (*FacetValue) String ¶
func (v *FacetValue) String() string
type FieldIndexing ¶
type FieldIndexing string
type FieldStorage ¶
type FieldStorage = string
type FieldTermVector ¶
type FieldTermVector = string
type GenericQueryResult ¶
type GenericQueryResult struct { TotalResults int `json:"TotalResults"` SkippedResults int `json:"SkippedResults"` //TBD 4.1 map[string]map[string]List<String>>> highlightings DurationInMs int64 `json:"DurationInMs"` ScoreExplanations map[string]string `json:"ScoreExplanation"` TimingsInMs map[string]float64 `json:"TimingsInMs"` ResultSize int64 `json:"ResultSize"` // contains filtered or unexported fields }
GenericQueryResult represents query results
type GenericRangeFacet ¶
type GenericRangeFacet struct { FacetBaseCommon Ranges []*RangeBuilder // contains filtered or unexported fields }
GenericRangeFacet represents generic range facet
func NewGenericRangeFacet ¶
func NewGenericRangeFacet(parent FacetBase) *GenericRangeFacet
NewGenericRangeFacet returns new GenericRangeFacet parent is optional, can be nil
func (*GenericRangeFacet) ToFacetToken ¶
func (f *GenericRangeFacet) ToFacetToken(addQueryParameter func(interface{}) string) (*facetToken, error)
ToFacetToken returns facetToken from GenericRangeFacet
type GetAttachmentCommand ¶
type GetAttachmentCommand struct { RavenCommandBase Result *AttachmentResult // contains filtered or unexported fields }
func NewGetAttachmentCommand ¶
func NewGetAttachmentCommand(documentID string, name string, typ AttachmentType, changeVector *string) (*GetAttachmentCommand, error)
TODO: should stream be io.ReadCloser? Who owns closing the attachment
func (*GetAttachmentCommand) CreateRequest ¶
func (c *GetAttachmentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type GetAttachmentOperation ¶
type GetAttachmentOperation struct { Command *GetAttachmentCommand // contains filtered or unexported fields }
func NewGetAttachmentOperation ¶
func NewGetAttachmentOperation(documentID string, name string, typ AttachmentType, contentType string, changeVector *string) *GetAttachmentOperation
func (*GetAttachmentOperation) GetCommand ¶
func (o *GetAttachmentOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type GetClientConfigurationCommand ¶
type GetClientConfigurationCommand struct { RavenCommandBase Result *GetClientConfigurationCommandResult }
func NewGetClientConfigurationCommand ¶
func NewGetClientConfigurationCommand() *GetClientConfigurationCommand
func (*GetClientConfigurationCommand) CreateRequest ¶
func (c *GetClientConfigurationCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetClientConfigurationCommand) SetResponse ¶
func (c *GetClientConfigurationCommand) SetResponse(response []byte, fromCache bool) error
type GetClientConfigurationCommandResult ¶
type GetClientConfigurationCommandResult struct { Etag int64 `json:"Etag"` Configuration *ClientConfiguration `json:"Configuration"` }
type GetClientConfigurationOperation ¶
type GetClientConfigurationOperation struct {
Command *GetClientConfigurationCommand
}
func NewGetClientConfigurationOperation ¶
func NewGetClientConfigurationOperation() *GetClientConfigurationOperation
func (*GetClientConfigurationOperation) GetCommand ¶
func (o *GetClientConfigurationOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetCollectionStatisticsCommand ¶
type GetCollectionStatisticsCommand struct { RavenCommandBase Result *CollectionStatistics }
func NewGetCollectionStatisticsCommand ¶
func NewGetCollectionStatisticsCommand() *GetCollectionStatisticsCommand
func (*GetCollectionStatisticsCommand) CreateRequest ¶
func (c *GetCollectionStatisticsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetCollectionStatisticsCommand) SetResponse ¶
func (c *GetCollectionStatisticsCommand) SetResponse(response []byte, fromCache bool) error
type GetCollectionStatisticsOperation ¶
type GetCollectionStatisticsOperation struct {
Command *GetCollectionStatisticsCommand
}
func NewGetCollectionStatisticsOperation ¶
func NewGetCollectionStatisticsOperation() *GetCollectionStatisticsOperation
func (*GetCollectionStatisticsOperation) GetCommand ¶
func (o *GetCollectionStatisticsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetCompareExchangeValueCommand ¶
type GetCompareExchangeValueCommand struct { RavenCommandBase Result *CompareExchangeValue // contains filtered or unexported fields }
func NewGetCompareExchangeValueCommand ¶
func NewGetCompareExchangeValueCommand(clazz reflect.Type, key string, conventions *DocumentConventions) (*GetCompareExchangeValueCommand, error)
func (*GetCompareExchangeValueCommand) CreateRequest ¶
func (c *GetCompareExchangeValueCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetCompareExchangeValueCommand) SetResponse ¶
func (c *GetCompareExchangeValueCommand) SetResponse(response []byte, fromCache bool) error
type GetCompareExchangeValueOperation ¶
type GetCompareExchangeValueOperation struct { Command *GetCompareExchangeValueCommand // contains filtered or unexported fields }
func NewGetCompareExchangeValueOperation ¶
func NewGetCompareExchangeValueOperation(clazz reflect.Type, key string) (*GetCompareExchangeValueOperation, error)
func (*GetCompareExchangeValueOperation) GetCommand ¶
func (o *GetCompareExchangeValueOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type GetCompareExchangeValuesCommand ¶
type GetCompareExchangeValuesCommand struct { RavenCommandBase Result map[string]*CompareExchangeValue // contains filtered or unexported fields }
func NewGetCompareExchangeValuesCommand ¶
func NewGetCompareExchangeValuesCommand(operation *GetCompareExchangeValuesOperation, conventions *DocumentConventions) (*GetCompareExchangeValuesCommand, error)
func (*GetCompareExchangeValuesCommand) CreateRequest ¶
func (c *GetCompareExchangeValuesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetCompareExchangeValuesCommand) SetResponse ¶
func (c *GetCompareExchangeValuesCommand) SetResponse(response []byte, fromCache bool) error
type GetCompareExchangeValuesOperation ¶
type GetCompareExchangeValuesOperation struct { Command *GetCompareExchangeValuesCommand // contains filtered or unexported fields }
func NewGetCompareExchangeValuesOperationWithKeys ¶
func NewGetCompareExchangeValuesOperationWithKeys(clazz reflect.Type, keys []string) (*GetCompareExchangeValuesOperation, error)
func (*GetCompareExchangeValuesOperation) GetCommand ¶
func (o *GetCompareExchangeValuesOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type GetConflictsCommand ¶
type GetConflictsCommand struct { RavenCommandBase Result *GetConflictsResult // contains filtered or unexported fields }
func NewGetConflictsCommand ¶
func NewGetConflictsCommand(id string) *GetConflictsCommand
func (*GetConflictsCommand) CreateRequest ¶
func (c *GetConflictsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetConflictsCommand) SetResponse ¶
func (c *GetConflictsCommand) SetResponse(response []byte, fromCache bool) error
type GetConflictsResult ¶
type GetConflictsResult struct { ID string `json:"Id"` Results []*Conflict `json:"Results"` LargestEtag int64 `json:"LargestEtag"` }
GetConflictsResult represents result of "get conflict" command
type GetDatabaseNamesCommand ¶
type GetDatabaseNamesCommand struct { RavenCommandBase Result []string // contains filtered or unexported fields }
func NewGetDatabaseNamesCommand ¶
func NewGetDatabaseNamesCommand(_start int, _pageSize int) *GetDatabaseNamesCommand
func (*GetDatabaseNamesCommand) CreateRequest ¶
func (c *GetDatabaseNamesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetDatabaseNamesCommand) SetResponse ¶
func (c *GetDatabaseNamesCommand) SetResponse(response []byte, fromCache bool) error
type GetDatabaseNamesOperation ¶
type GetDatabaseNamesOperation struct {
// contains filtered or unexported fields
}
func NewGetDatabaseNamesOperation ¶
func NewGetDatabaseNamesOperation(_start int, _pageSize int) *GetDatabaseNamesOperation
func (*GetDatabaseNamesOperation) GetCommand ¶
func (o *GetDatabaseNamesOperation) GetCommand(conventions *DocumentConventions) *GetDatabaseNamesCommand
type GetDatabaseNamesResult ¶
type GetDatabaseNamesResult struct {
Databases []string `json:"Databases"`
}
GetDatabaseNamesResult describes response of GetDatabaseNames command
type GetDatabaseRecordCommand ¶
type GetDatabaseRecordCommand struct { RavenCommandBase Result *DatabaseRecordWithEtag // contains filtered or unexported fields }
func NewGetDatabaseRecordCommand ¶
func NewGetDatabaseRecordCommand(conventions *DocumentConventions, database string) *GetDatabaseRecordCommand
func (*GetDatabaseRecordCommand) CreateRequest ¶
func (c *GetDatabaseRecordCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetDatabaseRecordCommand) SetResponse ¶
func (c *GetDatabaseRecordCommand) SetResponse(response []byte, fromCache bool) error
type GetDatabaseRecordOperation ¶
type GetDatabaseRecordOperation struct { Command *GetDatabaseRecordCommand // contains filtered or unexported fields }
func NewGetDatabaseRecordOperation ¶
func NewGetDatabaseRecordOperation(database string) *GetDatabaseRecordOperation
func (*GetDatabaseRecordOperation) GetCommand ¶
func (o *GetDatabaseRecordOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetDatabaseTopologyCommand ¶
type GetDatabaseTopologyCommand struct { RavenCommandBase Result *Topology }
func NewGetDatabaseTopologyCommand ¶
func NewGetDatabaseTopologyCommand() *GetDatabaseTopologyCommand
func (*GetDatabaseTopologyCommand) CreateRequest ¶
func (c *GetDatabaseTopologyCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetDatabaseTopologyCommand) SetResponse ¶
func (c *GetDatabaseTopologyCommand) SetResponse(response []byte, fromCache bool) error
type GetDocumentsCommand ¶
type GetDocumentsCommand struct { RavenCommandBase Result *GetDocumentsResult // contains filtered or unexported fields }
func NewGetDocumentsCommand ¶
func NewGetDocumentsCommand(ids []string, includes []string, metadataOnly bool) (*GetDocumentsCommand, error)
func (*GetDocumentsCommand) CreateRequest ¶
func (c *GetDocumentsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetDocumentsCommand) SetResponse ¶
func (c *GetDocumentsCommand) SetResponse(response []byte, fromCache bool) error
type GetDocumentsResult ¶
type GetDocumentsResult struct { Includes map[string]interface{} `json:"Includes"` Results []map[string]interface{} `json:"Results"` NextPageStart int `json:"NextPageStart"` }
GetDocumentsResult is a result of GetDocument command
type GetIdentitiesCommand ¶
type GetIdentitiesCommand struct { RavenCommandBase Result map[string]int }
func NewGetIdentitiesCommand ¶
func NewGetIdentitiesCommand() *GetIdentitiesCommand
func (*GetIdentitiesCommand) CreateRequest ¶
func (c *GetIdentitiesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIdentitiesCommand) SetResponse ¶
func (c *GetIdentitiesCommand) SetResponse(response []byte, fromCache bool) error
type GetIdentitiesOperation ¶
type GetIdentitiesOperation struct {
Command *GetIdentitiesCommand
}
func NewGetIdentitiesOperation ¶
func NewGetIdentitiesOperation() *GetIdentitiesOperation
func (*GetIdentitiesOperation) GetCommand ¶
func (o *GetIdentitiesOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexCommand ¶
type GetIndexCommand struct { RavenCommandBase Result *IndexDefinition // contains filtered or unexported fields }
func NewGetIndexCommand ¶
func NewGetIndexCommand(indexName string) (*GetIndexCommand, error)
func (*GetIndexCommand) CreateRequest ¶
func (c *GetIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexCommand) SetResponse ¶
func (c *GetIndexCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexErrorsCommand ¶
type GetIndexErrorsCommand struct { RavenCommandBase Result []*IndexErrors // contains filtered or unexported fields }
func NewGetIndexErrorsCommand ¶
func NewGetIndexErrorsCommand(indexNames []string) *GetIndexErrorsCommand
func (*GetIndexErrorsCommand) CreateRequest ¶
func (c *GetIndexErrorsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexErrorsCommand) SetResponse ¶
func (c *GetIndexErrorsCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexErrorsOperation ¶
type GetIndexErrorsOperation struct { Command *GetIndexErrorsCommand // contains filtered or unexported fields }
func NewGetIndexErrorsOperation ¶
func NewGetIndexErrorsOperation(indexNames []string) *GetIndexErrorsOperation
func (*GetIndexErrorsOperation) GetCommand ¶
func (o *GetIndexErrorsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexNamesCommand ¶
type GetIndexNamesCommand struct { RavenCommandBase Result []string // contains filtered or unexported fields }
func NewGetIndexNamesCommand ¶
func NewGetIndexNamesCommand(start int, pageSize int) *GetIndexNamesCommand
func (*GetIndexNamesCommand) CreateRequest ¶
func (c *GetIndexNamesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexNamesCommand) SetResponse ¶
func (c *GetIndexNamesCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexNamesOperation ¶
type GetIndexNamesOperation struct { Command *GetIndexNamesCommand // contains filtered or unexported fields }
func NewGetIndexNamesOperation ¶
func NewGetIndexNamesOperation(start int, pageSize int) *GetIndexNamesOperation
func (*GetIndexNamesOperation) GetCommand ¶
func (o *GetIndexNamesOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexOperation ¶
type GetIndexOperation struct { Command *GetIndexCommand // contains filtered or unexported fields }
func NewGetIndexOperation ¶
func NewGetIndexOperation(indexName string) *GetIndexOperation
func (*GetIndexOperation) GetCommand ¶
func (o *GetIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexStatisticsCommand ¶
type GetIndexStatisticsCommand struct { RavenCommandBase Result *IndexStats // contains filtered or unexported fields }
func NewGetIndexStatisticsCommand ¶
func NewGetIndexStatisticsCommand(indexName string) (*GetIndexStatisticsCommand, error)
func (*GetIndexStatisticsCommand) CreateRequest ¶
func (c *GetIndexStatisticsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexStatisticsCommand) SetResponse ¶
func (c *GetIndexStatisticsCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexStatisticsOperation ¶
type GetIndexStatisticsOperation struct { Command *GetIndexStatisticsCommand // contains filtered or unexported fields }
func NewGetIndexStatisticsOperation ¶
func NewGetIndexStatisticsOperation(indexName string) *GetIndexStatisticsOperation
func (*GetIndexStatisticsOperation) GetCommand ¶
func (o *GetIndexStatisticsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexesCommand ¶
type GetIndexesCommand struct { RavenCommandBase Result []*IndexDefinition // contains filtered or unexported fields }
func NewGetIndexesCommand ¶
func NewGetIndexesCommand(_start int, _pageSize int) *GetIndexesCommand
func (*GetIndexesCommand) CreateRequest ¶
func (c *GetIndexesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexesCommand) SetResponse ¶
func (c *GetIndexesCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexesOperation ¶
type GetIndexesOperation struct { Command *GetIndexesCommand // contains filtered or unexported fields }
func NewGetIndexesOperation ¶
func NewGetIndexesOperation(_start int, _pageSize int) *GetIndexesOperation
func (*GetIndexesOperation) GetCommand ¶
func (o *GetIndexesOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexesStatisticsCommand ¶
type GetIndexesStatisticsCommand struct { RavenCommandBase Result []*IndexStats }
func NewGetIndexesStatisticsCommand ¶
func NewGetIndexesStatisticsCommand() *GetIndexesStatisticsCommand
func (*GetIndexesStatisticsCommand) CreateRequest ¶
func (c *GetIndexesStatisticsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexesStatisticsCommand) SetResponse ¶
func (c *GetIndexesStatisticsCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexesStatisticsOperation ¶
type GetIndexesStatisticsOperation struct {
Command *GetIndexesStatisticsCommand
}
func NewGetIndexesStatisticsOperation ¶
func NewGetIndexesStatisticsOperation() *GetIndexesStatisticsOperation
func (*GetIndexesStatisticsOperation) GetCommand ¶
func (o *GetIndexesStatisticsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetIndexingStatusCommand ¶
type GetIndexingStatusCommand struct { RavenCommandBase Result *IndexingStatus }
func NewGetIndexingStatusCommand ¶
func NewGetIndexingStatusCommand() *GetIndexingStatusCommand
func (*GetIndexingStatusCommand) CreateRequest ¶
func (c *GetIndexingStatusCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetIndexingStatusCommand) SetResponse ¶
func (c *GetIndexingStatusCommand) SetResponse(response []byte, fromCache bool) error
type GetIndexingStatusOperation ¶
type GetIndexingStatusOperation struct {
Command *GetIndexingStatusCommand
}
func NewGetIndexingStatusOperation ¶
func NewGetIndexingStatusOperation() *GetIndexingStatusOperation
func (*GetIndexingStatusOperation) GetCommand ¶
func (o *GetIndexingStatusOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetNextOperationIDCommand ¶
type GetNextOperationIDCommand struct { RavenCommandBase Result int64 }
GetNextOperationIDCommand represents command for getting next id from the server
func NewGetNextOperationIDCommand ¶
func NewGetNextOperationIDCommand() *GetNextOperationIDCommand
NewGetNextOperationIDCommand returns GetNextOperationIDCommand
func (*GetNextOperationIDCommand) CreateRequest ¶
func (c *GetNextOperationIDCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetNextOperationIDCommand) SetResponse ¶
func (c *GetNextOperationIDCommand) SetResponse(response []byte, fromCache bool) error
type GetOperationStateCommand ¶
type GetOperationStateCommand struct { RavenCommandBase Result map[string]interface{} // contains filtered or unexported fields }
func NewGetOperationStateCommand ¶
func NewGetOperationStateCommand(conventions *DocumentConventions, id int64) *GetOperationStateCommand
func (*GetOperationStateCommand) CreateRequest ¶
func (c *GetOperationStateCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetOperationStateCommand) SetResponse ¶
func (c *GetOperationStateCommand) SetResponse(response []byte, fromCache bool) error
type GetOperationStateOperation ¶
type GetOperationStateOperation struct {
// contains filtered or unexported fields
}
func (*GetOperationStateOperation) GetCommand ¶
func (o *GetOperationStateOperation) GetCommand(conventions *DocumentConventions) *GetOperationStateCommand
type GetResponse ¶
type GetResponse struct { Result []byte Headers map[string]string StatusCode int IsForceRetry bool }
GetResponse represents result of get request
type GetRevisionOperation ¶
type GetRevisionOperation struct {
// contains filtered or unexported fields
}
GetRevisionOperation represents "get revisions" operation
func NewGetRevisionOperationRange ¶
func NewGetRevisionOperationRange(session *InMemoryDocumentSessionOperations, id string, start int, pageSize int, metadataOnly bool) (*GetRevisionOperation, error)
func NewGetRevisionOperationWithChangeVectors ¶
func NewGetRevisionOperationWithChangeVectors(session *InMemoryDocumentSessionOperations, changeVectors []string) *GetRevisionOperation
func (*GetRevisionOperation) GetRevision ¶
func (o *GetRevisionOperation) GetRevision(result interface{}) error
func (*GetRevisionOperation) GetRevisionWithDocument ¶
func (o *GetRevisionOperation) GetRevisionWithDocument(result interface{}, document map[string]interface{}) error
Note: in Java it's getRevision
func (*GetRevisionOperation) GetRevisions ¶
func (o *GetRevisionOperation) GetRevisions(results interface{}) error
result should be map[string]<type>
func (*GetRevisionOperation) GetRevisionsFor ¶
func (o *GetRevisionOperation) GetRevisionsFor(results interface{}) error
results should be *[]*<type>
func (*GetRevisionOperation) GetRevisionsMetadataFor ¶
func (o *GetRevisionOperation) GetRevisionsMetadataFor() []*MetadataAsDictionary
type GetRevisionsBinEntryCommand ¶
type GetRevisionsBinEntryCommand struct { RavenCommandBase Result *JSONArrayResult // contains filtered or unexported fields }
func NewGetRevisionsBinEntryCommand ¶
func NewGetRevisionsBinEntryCommand(etag int64, pageSize int) *GetRevisionsBinEntryCommand
func (*GetRevisionsBinEntryCommand) CreateRequest ¶
func (c *GetRevisionsBinEntryCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetRevisionsBinEntryCommand) SetResponse ¶
func (c *GetRevisionsBinEntryCommand) SetResponse(response []byte, fromCache bool) error
type GetRevisionsCommand ¶
type GetRevisionsCommand struct { RavenCommandBase Result *JSONArrayResult // contains filtered or unexported fields }
func NewGetRevisionsCommand ¶
func NewGetRevisionsCommand(changeVectors []string, metadataOnly bool) *GetRevisionsCommand
func NewGetRevisionsCommandRange ¶
func NewGetRevisionsCommandRange(id string, start int, pageSize int, metadataOnly bool) *GetRevisionsCommand
func (*GetRevisionsCommand) CreateRequest ¶
func (c *GetRevisionsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetRevisionsCommand) GetChangeVectors ¶
func (c *GetRevisionsCommand) GetChangeVectors() []string
func (*GetRevisionsCommand) SetResponse ¶
func (c *GetRevisionsCommand) SetResponse(response []byte, fromCache bool) error
type GetServerWideOperationStateCommand ¶
type GetServerWideOperationStateCommand struct { RavenCommandBase Result map[string]interface{} // contains filtered or unexported fields }
func NewGetServerWideOperationStateCommand ¶
func NewGetServerWideOperationStateCommand(conventions *DocumentConventions, id int64) *GetServerWideOperationStateCommand
func (*GetServerWideOperationStateCommand) CreateRequest ¶
func (c *GetServerWideOperationStateCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetServerWideOperationStateCommand) SetResponse ¶
func (c *GetServerWideOperationStateCommand) SetResponse(response []byte, fromCache bool) error
type GetServerWideOperationStateOperation ¶
type GetServerWideOperationStateOperation struct {
// contains filtered or unexported fields
}
func (*GetServerWideOperationStateOperation) GetCommand ¶
func (o *GetServerWideOperationStateOperation) GetCommand(conventions *DocumentConventions) *GetServerWideOperationStateCommand
type GetStatisticsCommand ¶
type GetStatisticsCommand struct { RavenCommandBase Result *DatabaseStatistics // contains filtered or unexported fields }
func NewGetStatisticsCommand ¶
func NewGetStatisticsCommand(debugTag string) *GetStatisticsCommand
func (*GetStatisticsCommand) CreateRequest ¶
func (c *GetStatisticsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetStatisticsCommand) SetResponse ¶
func (c *GetStatisticsCommand) SetResponse(response []byte, fromCache bool) error
type GetStatisticsOperation ¶
type GetStatisticsOperation struct { Command *GetStatisticsCommand // contains filtered or unexported fields }
func NewGetStatisticsOperation ¶
func NewGetStatisticsOperation(debugTag string) *GetStatisticsOperation
func (*GetStatisticsOperation) GetCommand ¶
func (o *GetStatisticsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type GetSubscriptionStateCommand ¶
type GetSubscriptionStateCommand struct { RavenCommandBase Result *SubscriptionState // contains filtered or unexported fields }
GetSubscriptionStateCommand describes "get subscription state" command
func (*GetSubscriptionStateCommand) CreateRequest ¶
func (c *GetSubscriptionStateCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetSubscriptionStateCommand) SetResponse ¶
func (c *GetSubscriptionStateCommand) SetResponse(response []byte, fromCache bool) error
type GetSubscriptionsCommand ¶
type GetSubscriptionsCommand struct { RavenCommandBase Result []*SubscriptionState // contains filtered or unexported fields }
GetSubscriptionsCommand describes "delete subscription" command
func (*GetSubscriptionsCommand) CreateRequest ¶
func (c *GetSubscriptionsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetSubscriptionsCommand) SetResponse ¶
func (c *GetSubscriptionsCommand) SetResponse(response []byte, fromCache bool) error
type GetSubscriptionsResult ¶
type GetSubscriptionsResult struct {
Results []*SubscriptionState `json:"Results"`
}
GetSubscriptionsResult represents result of "get subscriptions"
type GetTcpInfoCommand ¶
type GetTcpInfoCommand struct { RavenCommandBase Result *TcpConnectionInfo // contains filtered or unexported fields }
GetTcpInfoCommand describes "get tcp info" command
func NewGetTcpInfoCommand ¶
func NewGetTcpInfoCommand(tag, dbName string) *GetTcpInfoCommand
NewGetTcpInfoCommand returns new GetTcpInfoCommand dbName is optional
func (*GetTcpInfoCommand) CreateRequest ¶
func (c *GetTcpInfoCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetTcpInfoCommand) SetResponse ¶
func (c *GetTcpInfoCommand) SetResponse(response []byte, fromCache bool) error
type GetTermsCommand ¶
type GetTermsCommand struct { RavenCommandBase Result []string // contains filtered or unexported fields }
GetTermsCommand represents "get terms" command
func NewGetTermsCommand ¶
func NewGetTermsCommand(indexName string, field string, fromValue string, pageSize int) (*GetTermsCommand, error)
NewGetTermsCommand returns new GetTermsCommand
func (*GetTermsCommand) CreateRequest ¶
func (c *GetTermsCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*GetTermsCommand) SetResponse ¶
func (c *GetTermsCommand) SetResponse(response []byte, fromCache bool) error
type GetTermsOperation ¶
type GetTermsOperation struct { Command *GetTermsCommand // contains filtered or unexported fields }
GetTermsOperation represents "get terms" operation
func NewGetTermsOperation ¶
func NewGetTermsOperation(indexName string, field string, fromValue string, pageSize int) (*GetTermsOperation, error)
NewGetTermsOperation returns GetTermsOperation. pageSize 0 means default size
func (*GetTermsOperation) GetCommand ¶
func (o *GetTermsOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns command for this operation
type GroupBy ¶
type GroupBy struct { Field string Method GroupByMethod }
GroupBy represents arguments to "group by" query
func NewGroupByArray ¶
NewGroupByField returns new GroupBy for an array
func NewGroupByField ¶
NewGroupByField returns new GroupBy for a field
type GroupByDocumentQuery ¶
type GroupByDocumentQuery struct {
// contains filtered or unexported fields
}
GroupByDocumentQuery represents a "group by" query
func (*GroupByDocumentQuery) SelectCount ¶
func (q *GroupByDocumentQuery) SelectCount() *DocumentQuery
func (*GroupByDocumentQuery) SelectCountWithName ¶
func (q *GroupByDocumentQuery) SelectCountWithName(projectedName string) *DocumentQuery
func (*GroupByDocumentQuery) SelectKey ¶
func (q *GroupByDocumentQuery) SelectKey() *GroupByDocumentQuery
func (*GroupByDocumentQuery) SelectKeyWithName ¶
func (q *GroupByDocumentQuery) SelectKeyWithName(fieldName string) *GroupByDocumentQuery
func (*GroupByDocumentQuery) SelectKeyWithNameAndProjectedName ¶
func (q *GroupByDocumentQuery) SelectKeyWithNameAndProjectedName(fieldName string, projectedName string) *GroupByDocumentQuery
func (*GroupByDocumentQuery) SelectSum ¶
func (q *GroupByDocumentQuery) SelectSum(field *GroupByField, fields ...*GroupByField) *DocumentQuery
type GroupByField ¶
GroupByField represents a field by which to group in a query
type GroupByMethod ¶
type GroupByMethod = string
type HashCalculator ¶
type HashCalculator struct {
// contains filtered or unexported fields
}
type HeadAttachmentCommand ¶
type HeadAttachmentCommand struct { RavenCommandBase Result string // TODO: should this be *string? // contains filtered or unexported fields }
func NewHeadAttachmentCommand ¶
func NewHeadAttachmentCommand(documentID string, name string, changeVector *string) (*HeadAttachmentCommand, error)
func (*HeadAttachmentCommand) CreateRequest ¶
func (c *HeadAttachmentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*HeadAttachmentCommand) SetResponse ¶
func (c *HeadAttachmentCommand) SetResponse(response []byte, fromCache bool) error
type HeadDocumentCommand ¶
type HeadDocumentCommand struct { RavenCommandBase Result *string // change vector // contains filtered or unexported fields }
HeadDocumentCommand describes "head document" command
func NewHeadDocumentCommand ¶
func NewHeadDocumentCommand(id string, changeVector *string) *HeadDocumentCommand
NewHeadDocumentCommand returns new HeadDocumentCommand
func (*HeadDocumentCommand) CreateRequest ¶
func (c *HeadDocumentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*HeadDocumentCommand) Exists ¶
func (c *HeadDocumentCommand) Exists() bool
Exists returns true if the command has a result
func (*HeadDocumentCommand) ProcessResponse ¶
func (c *HeadDocumentCommand) ProcessResponse(cache *httpCache, response *http.Response, url string) (responseDisposeHandling, error)
ProcessResponse processes HTTP response
func (*HeadDocumentCommand) SetResponse ¶
func (c *HeadDocumentCommand) SetResponse(response []byte, fromCache bool) error
type HiLoIDGenerator ¶
type HiLoIDGenerator struct {
// contains filtered or unexported fields
}
HiLoIDGenerator generates document ids server side
func NewHiLoIDGenerator ¶
func NewHiLoIDGenerator(tag string, store *DocumentStore, dbName string, identityPartsSeparator string) *HiLoIDGenerator
NewHiLoIDGenerator creates a HiLoIDGenerator
func (*HiLoIDGenerator) GenerateDocumentID ¶
func (g *HiLoIDGenerator) GenerateDocumentID(entity interface{}) (string, error)
GenerateDocumentID returns next key
func (*HiLoIDGenerator) GetDocumentIDFromID ¶
func (g *HiLoIDGenerator) GetDocumentIDFromID(nextID int64) string
func (*HiLoIDGenerator) GetNextRange ¶
func (g *HiLoIDGenerator) GetNextRange() error
func (*HiLoIDGenerator) NextID ¶
func (g *HiLoIDGenerator) NextID() (int64, error)
func (*HiLoIDGenerator) ReturnUnusedRange ¶
func (g *HiLoIDGenerator) ReturnUnusedRange() error
ReturnUnusedRange returns unused range to the server
type HiLoResult ¶
type HiLoResult struct { Prefix string `json:"Prefix"` Low int64 `json:"Low"` High int64 `json:"High"` LastSize int64 `json:"LastSize"` ServerTag string `json:"ServerTag"` LastRangeAt *Time `json:"LastRangeAt"` }
HiLoResult is a result of HiLoResult command
type HiLoReturnCommand ¶
type HiLoReturnCommand struct { RavenCommandBase // contains filtered or unexported fields }
HiLoReturnCommand represents "hi lo return" command
func NewHiLoReturnCommand ¶
func NewHiLoReturnCommand(tag string, last int64, end int64) (*HiLoReturnCommand, error)
NewHiLoReturnCommand returns a new HiLoReturnCommand
func (*HiLoReturnCommand) CreateRequest ¶
func (c *HiLoReturnCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type ICommandData ¶
type ICommandData interface {
// contains filtered or unexported methods
}
ICommandData represents command data
func NewDeleteCommandData ¶
func NewDeleteCommandData(id string, changeVector string) ICommandData
NewDeleteCommandData creates ICommandData for Delete command
func NewPatchCommandData ¶
func NewPatchCommandData(id string, changeVector *string, patch *PatchRequest, patchIfMissing *PatchRequest) ICommandData
NewPatchCommandData creates CommandData for Delete Attachment command TODO: return a concrete type?
type ICompareExchangeValue ¶
type ICompareExchangeValue interface { GetKey() string GetIndex() int64 SetIndex(int64) GetValue() interface{} GetMetadata() *MetadataAsDictionary HasMetadata() bool }
type ILazyOperation ¶
type ILazyOperation interface {
// contains filtered or unexported methods
}
ILazyOperation defines methods required to implement lazy operation
type IMaintenanceOperation ¶
type IMaintenanceOperation interface {
GetCommand(*DocumentConventions) (RavenCommand, error)
}
type IMoreLikeThisBuilderBase ¶
type IMoreLikeThisBuilderBase interface { UsingAnyDocument() IMoreLikeThisOperations UsingDocument(documentJson string) IMoreLikeThisOperations }
type IMoreLikeThisBuilderForDocumentQuery ¶
type IMoreLikeThisBuilderForDocumentQuery interface { // Note: it's usingDocument() in Java but conflicts with IMoreLikeThisBuilderBase UsingDocumentWithBuilder(builder func(*DocumentQuery)) IMoreLikeThisOperations UsingAnyDocument() IMoreLikeThisOperations UsingDocument(string) IMoreLikeThisOperations }
type IMoreLikeThisOperations ¶
type IMoreLikeThisOperations interface {
WithOptions(options *MoreLikeThisOptions) IMoreLikeThisOperations
}
type IOperation ¶
type IOperation interface {
GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
}
type IRaftCommand ¶
type IRaftCommand interface {
RaftUniqueRequestId() string
}
type IServerOperation ¶
type IServerOperation interface {
GetCommand(*DocumentConventions) (RavenCommand, error)
}
type IVoidMaintenanceOperation ¶
type IVoidMaintenanceOperation = IMaintenanceOperation
For documentation/porting only. Go has no generics so it's the same as IMaintenanceOperation
type IllegalArgumentError ¶
type IllegalArgumentError struct {
// contains filtered or unexported fields
}
IllegalArgumentError represents illegal argument error
func (*IllegalArgumentError) Error ¶
func (e *IllegalArgumentError) Error() string
Error makes it conform to error interface
func (*IllegalArgumentError) WrappedError ¶
func (e *IllegalArgumentError) WrappedError() error
hackish way to get a wrapped error
type IllegalStateError ¶
type IllegalStateError struct {
// contains filtered or unexported fields
}
IllegalStateError represents illegal state error
func (*IllegalStateError) Error ¶
func (e *IllegalStateError) Error() string
Error makes it conform to error interface
func (*IllegalStateError) WrappedError ¶
func (e *IllegalStateError) WrappedError() error
hackish way to get a wrapped error
type InMemoryDocumentSessionOperations ¶
type InMemoryDocumentSessionOperations struct { DatabaseName string Conventions *DocumentConventions // contains filtered or unexported fields }
InMemoryDocumentSessionOperations represents database operations queued in memory
func (*InMemoryDocumentSessionOperations) AddAfterSaveChangesListener ¶
func (s *InMemoryDocumentSessionOperations) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int
AddAfterSaveChangesListener registers a function that will be called before saving changes. Returns listener id that can be passed to RemoveAfterSaveChangesListener to unregister the listener.
func (*InMemoryDocumentSessionOperations) AddBeforeDeleteListener ¶
func (s *InMemoryDocumentSessionOperations) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int
AddBeforeDeleteListener registers a function that will be called before deleting an entity. Returns listener id that can be passed to RemoveBeforeDeleteListener to unregister the listener.
func (*InMemoryDocumentSessionOperations) AddBeforeQueryListener ¶
func (s *InMemoryDocumentSessionOperations) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int
AddBeforeQueryListener registers a function that will be called before running a query. It allows customizing query via DocumentQueryCustomization. Returns listener id that can be passed to RemoveBeforeQueryListener to unregister the listener.
func (*InMemoryDocumentSessionOperations) AddBeforeStoreListener ¶
func (s *InMemoryDocumentSessionOperations) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int
AddBeforeStoreStoreListener registers a function that will be called before storing an entity. Returns listener id that can be passed to RemoveBeforeStoreListener to unregister the listener.
func (*InMemoryDocumentSessionOperations) Clear ¶
func (s *InMemoryDocumentSessionOperations) Clear()
Clear clears the session
func (*InMemoryDocumentSessionOperations) Close ¶
func (s *InMemoryDocumentSessionOperations) Close()
Close performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
func (*InMemoryDocumentSessionOperations) Defer ¶
func (s *InMemoryDocumentSessionOperations) Defer(commands ...ICommandData)
Defer defers commands to be executed on SaveChanges()
func (*InMemoryDocumentSessionOperations) Delete ¶
func (s *InMemoryDocumentSessionOperations) Delete(entity interface{}) error
Delete marks the specified entity for deletion. The entity will be deleted when SaveChanges is called.
func (*InMemoryDocumentSessionOperations) DeleteByID ¶
func (s *InMemoryDocumentSessionOperations) DeleteByID(id string, expectedChangeVector string) error
DeleteByID marks the specified entity for deletion. The entity will be deleted when SaveChanges is called. WARNING: This method will not call beforeDelete listener!
func (*InMemoryDocumentSessionOperations) Evict ¶
func (s *InMemoryDocumentSessionOperations) Evict(entity interface{}) error
Evict evicts the specified entity from the session. Remove the entity from the delete queue and stops tracking changes for this entity.
func (*InMemoryDocumentSessionOperations) GenerateID ¶
func (s *InMemoryDocumentSessionOperations) GenerateID(entity interface{}) (string, error)
func (*InMemoryDocumentSessionOperations) GetChangeVectorFor ¶
func (s *InMemoryDocumentSessionOperations) GetChangeVectorFor(instance interface{}) (*string, error)
GetChangeVectorFor returns metadata for a given instance empty string means there is not change vector
func (*InMemoryDocumentSessionOperations) GetClusterSession ¶
func (s *InMemoryDocumentSessionOperations) GetClusterSession() (*ClusterTransactionOperations, error)
func (*InMemoryDocumentSessionOperations) GetConventions ¶
func (s *InMemoryDocumentSessionOperations) GetConventions() *DocumentConventions
GetConventions returns DocumentConventions
func (*InMemoryDocumentSessionOperations) GetCurrentSessionNode ¶
func (s *InMemoryDocumentSessionOperations) GetCurrentSessionNode() (*ServerNode, error)
func (*InMemoryDocumentSessionOperations) GetDeferredCommandsCount ¶
func (s *InMemoryDocumentSessionOperations) GetDeferredCommandsCount() int
GetDeferredCommandsCount returns number of deferred commands
func (*InMemoryDocumentSessionOperations) GetDocumentID ¶
func (s *InMemoryDocumentSessionOperations) GetDocumentID(instance interface{}) string
GetDocumentID returns id of a given instance
func (*InMemoryDocumentSessionOperations) GetDocumentStore ¶
func (s *InMemoryDocumentSessionOperations) GetDocumentStore() *DocumentStore
func (*InMemoryDocumentSessionOperations) GetLastModifiedFor ¶
func (s *InMemoryDocumentSessionOperations) GetLastModifiedFor(instance interface{}) (*time.Time, error)
GetLastModifiedFor returns last modified time for a given instance
func (*InMemoryDocumentSessionOperations) GetMetadataFor ¶
func (s *InMemoryDocumentSessionOperations) GetMetadataFor(instance interface{}) (*MetadataAsDictionary, error)
GetMetadataFor gets the metadata for the specified entity. TODO: should we make the API more robust by accepting **struct as well as *struct and doing the necessary tweaking automatically? It looks like GetMetadataFor(&foo) might be used reflexively and it might not be easy to figure out why it fails. Alternatively, error out early with informative error message
func (*InMemoryDocumentSessionOperations) GetNumberOfEntitiesInUnitOfWork ¶
func (s *InMemoryDocumentSessionOperations) GetNumberOfEntitiesInUnitOfWork() int
GetNumberOfEntitiesInUnitOfWork returns number of entities
func (*InMemoryDocumentSessionOperations) GetNumberOfRequests ¶
func (s *InMemoryDocumentSessionOperations) GetNumberOfRequests() int
GetNumberOfRequests returns number of requests sent to the server
func (*InMemoryDocumentSessionOperations) GetOperations ¶
func (s *InMemoryDocumentSessionOperations) GetOperations() *OperationExecutor
func (*InMemoryDocumentSessionOperations) GetRequestExecutor ¶
func (s *InMemoryDocumentSessionOperations) GetRequestExecutor() *RequestExecutor
func (*InMemoryDocumentSessionOperations) HasChanged ¶
func (s *InMemoryDocumentSessionOperations) HasChanged(entity interface{}) (bool, error)
HasChanged returns true if an entity has changed.
func (*InMemoryDocumentSessionOperations) HasChanges ¶
func (s *InMemoryDocumentSessionOperations) HasChanges() bool
Gets a value indicating whether any of the entities tracked by the session has changes.
func (*InMemoryDocumentSessionOperations) IgnoreChangesFor ¶
func (s *InMemoryDocumentSessionOperations) IgnoreChangesFor(entity interface{}) error
IgnoreChangesFor marks the entity as one that should be ignore for change tracking purposes, it still takes part in the session, but is ignored for SaveChanges.
func (*InMemoryDocumentSessionOperations) IsDeleted ¶
func (s *InMemoryDocumentSessionOperations) IsDeleted(id string) bool
IsDeleted returns true if document with this id is deleted in this session
func (*InMemoryDocumentSessionOperations) IsLoaded ¶
func (s *InMemoryDocumentSessionOperations) IsLoaded(id string) bool
IsLoaded returns true if document with this id is loaded
func (*InMemoryDocumentSessionOperations) IsLoadedOrDeleted ¶
func (s *InMemoryDocumentSessionOperations) IsLoadedOrDeleted(id string) bool
IsLoadedOrDeleted returns true if document with this id is loaded
func (*InMemoryDocumentSessionOperations) NoTracking ¶
func (s *InMemoryDocumentSessionOperations) NoTracking(mode bool)
Track entities in session. Default: false
func (*InMemoryDocumentSessionOperations) RemoveAfterSaveChangesListener ¶
func (s *InMemoryDocumentSessionOperations) RemoveAfterSaveChangesListener(handlerID int)
RemoveAfterSaveChangesListener removes a listener given id returned by AddAfterSaveChangesListener
func (*InMemoryDocumentSessionOperations) RemoveBeforeDeleteListener ¶
func (s *InMemoryDocumentSessionOperations) RemoveBeforeDeleteListener(handlerID int)
RemoveBeforeDeleteListener removes a listener given id returned by AddBeforeDeleteListener
func (*InMemoryDocumentSessionOperations) RemoveBeforeQueryListener ¶
func (s *InMemoryDocumentSessionOperations) RemoveBeforeQueryListener(handlerID int)
RemoveBeforeQueryListener removes a listener given id returned by AddBeforeQueryListener
func (*InMemoryDocumentSessionOperations) RemoveBeforeStoreListener ¶
func (s *InMemoryDocumentSessionOperations) RemoveBeforeStoreListener(handlerID int)
RemoveBeforeStoreListener removes a listener given id returned by AddBeforeStoreListener
func (*InMemoryDocumentSessionOperations) Store ¶
func (s *InMemoryDocumentSessionOperations) Store(entity interface{}) error
Store stores entity in the session. The entity will be saved when SaveChanges is called.
func (*InMemoryDocumentSessionOperations) StoreWithChangeVectorAndID ¶
func (s *InMemoryDocumentSessionOperations) StoreWithChangeVectorAndID(entity interface{}, changeVector string, id string) error
StoreWithChangeVectorAndID stores entity in the session, explicitly specifying its id and change vector. The entity will be saved when SaveChanges is called.
func (*InMemoryDocumentSessionOperations) StoreWithID ¶
func (s *InMemoryDocumentSessionOperations) StoreWithID(entity interface{}, id string) error
StoreWithID stores entity in the session, explicitly specifying its Id. The entity will be saved when SaveChanges is called.
func (*InMemoryDocumentSessionOperations) TrackEntity ¶
func (s *InMemoryDocumentSessionOperations) TrackEntity(result interface{}, id string, document map[string]interface{}, metadata map[string]interface{}, noTracking bool) error
TrackEntity tracks a given object result is a pointer to a decoded value (e.g. **Foo) and will be set with value decoded from JSON (e.g. *result = &Foo{})
func (*InMemoryDocumentSessionOperations) TrackEntityInDocumentInfo ¶
func (s *InMemoryDocumentSessionOperations) TrackEntityInDocumentInfo(result interface{}, documentFound *documentInfo) error
result is a pointer to expected value
func (*InMemoryDocumentSessionOperations) UpdateMetadataModifications ¶
func (s *InMemoryDocumentSessionOperations) UpdateMetadataModifications(documentInfo *documentInfo) bool
func (*InMemoryDocumentSessionOperations) UpdateMetadataModificationsTemp ¶
func (s *InMemoryDocumentSessionOperations) UpdateMetadataModificationsTemp(metadataInstance *MetadataAsDictionary, metadata map[string]interface{}) bool
func (*InMemoryDocumentSessionOperations) WaitForIndexesAfterSaveChanges ¶
func (s *InMemoryDocumentSessionOperations) WaitForIndexesAfterSaveChanges(options func(*IndexesWaitOptsBuilder))
func (*InMemoryDocumentSessionOperations) WaitForReplicationAfterSaveChanges ¶
func (s *InMemoryDocumentSessionOperations) WaitForReplicationAfterSaveChanges(options func(*ReplicationWaitOptsBuilder))
func (*InMemoryDocumentSessionOperations) WhatChanged ¶
func (s *InMemoryDocumentSessionOperations) WhatChanged() (map[string][]*DocumentsChanges, error)
type IndexAlreadyExistError ¶
type IndexAlreadyExistError struct {
RavenError
}
func (*IndexAlreadyExistError) Error ¶
func (e *IndexAlreadyExistError) Error() string
Error makes it conform to error interface
func (*IndexAlreadyExistError) WrappedError ¶
func (e *IndexAlreadyExistError) WrappedError() error
hackish way to get a wrapped error
type IndexChange ¶
type IndexChange struct { Type IndexChangeTypes Name string }
IndexChange describes a change to the index. Can be used as DatabaseChange.
type IndexChangeTypes ¶
type IndexChangeTypes = string
type IndexCompilationError ¶
type IndexCompilationError struct {
RavenError
}
func (*IndexCompilationError) Error ¶
func (e *IndexCompilationError) Error() string
Error makes it conform to error interface
func (*IndexCompilationError) WrappedError ¶
func (e *IndexCompilationError) WrappedError() error
hackish way to get a wrapped error
type IndexConfiguration ¶
TODO: desugar
func NewIndexConfiguration ¶
func NewIndexConfiguration() IndexConfiguration
type IndexCreationError ¶
type IndexCreationError struct {
RavenError
}
func (*IndexCreationError) Error ¶
func (e *IndexCreationError) Error() string
Error makes it conform to error interface
func (*IndexCreationError) WrappedError ¶
func (e *IndexCreationError) WrappedError() error
hackish way to get a wrapped error
type IndexCreationTask ¶
type IndexCreationTask struct { // for a single map index, set Map // for multiple map index, set Maps Map string Maps []string Reduce string Conventions *DocumentConventions AdditionalSources map[string]string Priority IndexPriority LockMode IndexLockMode StoresStrings map[string]FieldStorage IndexesStrings map[string]FieldIndexing AnalyzersStrings map[string]string IndexSuggestions []string TermVectorsStrings map[string]FieldTermVector SpatialOptionsStrings map[string]*SpatialOptions OutputReduceToCollection string // Note: in Go IndexName must provided explicitly // In Java it's dynamically calculated as getClass().getSimpleName() IndexName string }
IndexCreationTask is for creating IndexDefinition
func NewIndexCreationTask ¶
func NewIndexCreationTask(indexName string) *IndexCreationTask
NewAbstractIndexCreationTask returns new IndexCreationTask
func (*IndexCreationTask) Analyze ¶
func (t *IndexCreationTask) Analyze(field string, analyzer string)
Analyze registers field to be analyzed
func (*IndexCreationTask) CreateIndexDefinition ¶
func (t *IndexCreationTask) CreateIndexDefinition() *IndexDefinition
CreateIndexDefinition creates IndexDefinition
func (*IndexCreationTask) Execute ¶
func (t *IndexCreationTask) Execute(store *DocumentStore, conventions *DocumentConventions, database string) error
Execute executes index in specified document store
func (*IndexCreationTask) Index ¶
func (t *IndexCreationTask) Index(field string, indexing FieldIndexing)
Index registers field to be indexed
func (*IndexCreationTask) IsMapReduce ¶
func (t *IndexCreationTask) IsMapReduce() bool
IsMapReduce returns true if this is map-reduce index
func (*IndexCreationTask) Spatial ¶
func (t *IndexCreationTask) Spatial(field string, indexing func() *SpatialOptions)
Spatial registers field to be spatially indexed
func (*IndexCreationTask) Store ¶
func (t *IndexCreationTask) Store(field string, storage FieldStorage)
Store registers field to be stored
func (*IndexCreationTask) StoreAllFields ¶
func (t *IndexCreationTask) StoreAllFields(storage FieldStorage)
StoreAllFields selects if we're storing all fields or not
func (*IndexCreationTask) Suggestion ¶
func (t *IndexCreationTask) Suggestion(field string)
Suggestion registers field to be indexed as suggestions
func (*IndexCreationTask) TermVector ¶
func (t *IndexCreationTask) TermVector(field string, termVector FieldTermVector)
TermVector registers field to have term vectors
type IndexDefinition ¶
type IndexDefinition struct { Name string `json:"Name"` Priority IndexPriority `json:"Priority,omitempty"` LockMode IndexLockMode `json:"LockMode,omitempty"` AdditionalSources map[string]string `json:"AdditionalSources"` Maps []string `json:"Maps"` Reduce *string `json:"Reduce"` Fields map[string]*IndexFieldOptions `json:"Fields"` Configuration IndexConfiguration `json:"Configuration"` IndexType IndexType `json:"Type"` //TBD 4.1 bool testIndex; OutputReduceToCollection *string `json:"OutputReduceToCollection"` PatternReferencesCollectionName *string `json:"PatternReferencesCollectionName"` PatternForOutputReduceToCollectionReferences *string `json:"PatternForOutputReduceToCollectionReferences"` }
func NewIndexDefinition ¶
func NewIndexDefinition() *IndexDefinition
func (*IndexDefinition) GetAdditionalSources ¶
func (d *IndexDefinition) GetAdditionalSources() map[string]string
func (*IndexDefinition) GetConfiguration ¶
func (d *IndexDefinition) GetConfiguration() IndexConfiguration
func (*IndexDefinition) GetFields ¶
func (d *IndexDefinition) GetFields() map[string]*IndexFieldOptions
func (*IndexDefinition) GetOutputReduceToCollection ¶
func (d *IndexDefinition) GetOutputReduceToCollection() *string
func (*IndexDefinition) GetType ¶
func (d *IndexDefinition) GetType() IndexType
func (*IndexDefinition) SetAdditionalSources ¶
func (d *IndexDefinition) SetAdditionalSources(additionalSources map[string]string)
func (*IndexDefinition) SetConfiguration ¶
func (d *IndexDefinition) SetConfiguration(configuration IndexConfiguration)
func (*IndexDefinition) SetOutputReduceToCollection ¶
func (d *IndexDefinition) SetOutputReduceToCollection(outputReduceToCollection string)
func (*IndexDefinition) SetType ¶
func (d *IndexDefinition) SetType(indexType IndexType)
func (*IndexDefinition) String ¶
func (d *IndexDefinition) String() string
type IndexDefinitionBuilder ¶
type IndexDefinitionBuilder struct {
// contains filtered or unexported fields
}
func NewIndexDefinitionBuilder ¶
func NewIndexDefinitionBuilder(indexName string) *IndexDefinitionBuilder
type IndexDeletionError ¶
type IndexDeletionError struct {
RavenError
}
func (*IndexDeletionError) Error ¶
func (e *IndexDeletionError) Error() string
Error makes it conform to error interface
func (*IndexDeletionError) WrappedError ¶
func (e *IndexDeletionError) WrappedError() error
hackish way to get a wrapped error
type IndexDoesNotExistError ¶
type IndexDoesNotExistError struct {
RavenError
}
IndexDoesNotExistError represents "index doesn't exist" error
func (*IndexDoesNotExistError) Error ¶
func (e *IndexDoesNotExistError) Error() string
Error makes it conform to error interface
func (*IndexDoesNotExistError) WrappedError ¶
func (e *IndexDoesNotExistError) WrappedError() error
hackish way to get a wrapped error
type IndexErrors ¶
type IndexErrors struct { Name string `json:"Name"` Errors []*IndexingError `json:"Errors"` }
IndexErrors describes index errors
type IndexFieldOptions ¶
type IndexFieldOptions struct { Storage FieldStorage `json:"Storage,omitempty"` Indexing FieldIndexing `json:"Indexing,omitempty"` TermVector FieldTermVector `json:"TermVector,omitempty"` Spatial *SpatialOptions `json:"Spatial"` Analyzer string `json:"Analyzer,omitempty"` Suggestions bool `json:"Suggestions"` }
func NewIndexFieldOptions ¶
func NewIndexFieldOptions() *IndexFieldOptions
type IndexHasChangedCommand ¶
type IndexHasChangedCommand struct { RavenCommandBase Result bool // contains filtered or unexported fields }
func NewIndexHasChangedCommand ¶
func NewIndexHasChangedCommand(conventions *DocumentConventions, definition *IndexDefinition) (*IndexHasChangedCommand, error)
func (*IndexHasChangedCommand) CreateRequest ¶
func (c *IndexHasChangedCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*IndexHasChangedCommand) SetResponse ¶
func (c *IndexHasChangedCommand) SetResponse(response []byte, fromCache bool) error
type IndexHasChangedOperation ¶
type IndexHasChangedOperation struct { Command *IndexHasChangedCommand // contains filtered or unexported fields }
func NewIndexHasChangedOperation ¶
func NewIndexHasChangedOperation(definition *IndexDefinition) *IndexHasChangedOperation
func (*IndexHasChangedOperation) GetCommand ¶
func (o *IndexHasChangedOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type IndexInformation ¶
type IndexInformation struct { Name string `json:"Name"` IsStale bool `json:"IsStale"` State IndexState `json:"State"` LockMode IndexLockMode `json:"LockMode"` Priority IndexPriority `json:"Priority"` Type IndexType `json:"Type"` LastIndexingTime Time `json:"LastIndexingTime"` }
func (*IndexInformation) GetLastIndexingTime ¶
func (i *IndexInformation) GetLastIndexingTime() time.Time
type IndexInvalidError ¶
type IndexInvalidError struct {
RavenError
}
func (*IndexInvalidError) Error ¶
func (e *IndexInvalidError) Error() string
Error makes it conform to error interface
func (*IndexInvalidError) WrappedError ¶
func (e *IndexInvalidError) WrappedError() error
hackish way to get a wrapped error
type IndexLockMode ¶
type IndexLockMode = string
type IndexPriority ¶
type IndexPriority = string
type IndexQuery ¶
type IndexQuery struct {
// contains filtered or unexported fields
}
func (*IndexQuery) GetQuery ¶
func (q *IndexQuery) GetQuery() string
TODO: only for tests? Could expose with build-tags only for testing
func (*IndexQuery) GetQueryHash ¶
func (q *IndexQuery) GetQueryHash() string
func (*IndexQuery) GetQueryParameters ¶
func (q *IndexQuery) GetQueryParameters() Parameters
TODO: only for tests? Could expose with build-tags only for testing
func (*IndexQuery) String ¶
func (q *IndexQuery) String() string
type IndexQueryContent ¶
type IndexQueryContent struct {
// contains filtered or unexported fields
}
func NewIndexQueryContent ¶
func NewIndexQueryContent(conventions *DocumentConventions, query *IndexQuery) *IndexQueryContent
type IndexRunningStatus ¶
type IndexRunningStatus = string
type IndexState ¶
type IndexState = string
type IndexStats ¶
type IndexStats struct { Name string `json:"Name"` MapAttempts int `json:"MapAttempts"` MapSuccesses int `json:"MapSuccesses"` MapErrors int `json:"MapErrors"` ReduceAttempts *int `json:"ReduceAttempts"` ReduceSuccesses *int `json:"ReduceSuccesses"` ReduceErrors *int `json:"ReduceErrors"` MappedPerSecondRate float64 `json:"MappedPerSecondRate"` ReducedPerSecondRate float64 `json:"ReducedPerSecondRate"` MaxNumberOfOutputsPerDocument int `json:"MaxNumberOfOutputsPerDocument"` Collections map[string]*CollectionStats `json:"Collections"` LastQueryingTime Time `json:"LastQueryingTime"` State IndexState `json:"State"` Priority IndexPriority `json:"Priority"` CreatedTimestamp Time `json:"CreatedTimestamp"` LastIndexingTime Time `json:"LastIndexingTime"` IsStale bool `json:"Stale"` LockMode IndexLockMode `json:"LockMode"` Type IndexType `json:"Type"` Status IndexRunningStatus `json:"Status"` EntriesCount int `json:"EntriesCount"` ErrorsCount int `json:"ErrorsCount"` TestIndex bool `json:"IsTestIndex"` }
type IndexStatus ¶
type IndexStatus struct { Name string `json:"Name"` Status IndexRunningStatus `json:"Status"` }
type IndexesWaitOptsBuilder ¶
type IndexesWaitOptsBuilder struct {
// contains filtered or unexported fields
}
func (*IndexesWaitOptsBuilder) ThrowOnTimeout ¶
func (b *IndexesWaitOptsBuilder) ThrowOnTimeout(shouldThrow bool) *IndexesWaitOptsBuilder
func (*IndexesWaitOptsBuilder) WaitForIndexes ¶
func (b *IndexesWaitOptsBuilder) WaitForIndexes(indexes ...string) *IndexesWaitOptsBuilder
func (*IndexesWaitOptsBuilder) WithTimeout ¶
func (b *IndexesWaitOptsBuilder) WithTimeout(timeout time.Duration) *IndexesWaitOptsBuilder
type IndexingError ¶
type IndexingError struct { Error string `json:"Error"` Timestamp Time `json:"Timestamp"` Document string `json:"Document"` Action string `json:"Action"` }
IndexingError describes indexing error message from the server
func (*IndexingError) String ¶
func (e *IndexingError) String() string
type IndexingStatus ¶
type IndexingStatus struct { Status IndexRunningStatus `json:"Status"` Indexes []*IndexStatus `json:"Indexes"` }
type InvalidQueryError ¶
type InvalidQueryError struct {
RavenError
}
func (*InvalidQueryError) Error ¶
func (e *InvalidQueryError) Error() string
Error makes it conform to error interface
func (*InvalidQueryError) WrappedError ¶
func (e *InvalidQueryError) WrappedError() error
hackish way to get a wrapped error
type JSONArrayResult ¶
type JSONArrayResult struct { Results []map[string]interface{} `json:"Results"` TransactionIndex int64 `json:"TransactionIndex"` }
JSONArrayResult describes server's JSON response to batch command
type JavaScriptArray ¶
type JavaScriptArray struct { Parameters map[string]interface{} // contains filtered or unexported fields }
JavaScriptArray builds arguments for patch operation on array fields
func NewJavaScriptArray ¶
func NewJavaScriptArray(suffix int, pathToArray string) *JavaScriptArray
NewJavaScriptArray creates a new JavaScriptArray
func (*JavaScriptArray) Add ¶
func (a *JavaScriptArray) Add(args ...interface{}) *JavaScriptArray
Add builds expression that adds an elements to array
func (*JavaScriptArray) GetScript ¶
func (a *JavaScriptArray) GetScript() string
func (*JavaScriptArray) RemoveAt ¶
func (a *JavaScriptArray) RemoveAt(index int) *JavaScriptArray
RemoveAt builds expression that removes an element at index from array
type JavaScriptError ¶
type JavaScriptError struct {
RavenError
}
func (*JavaScriptError) Error ¶
func (e *JavaScriptError) Error() string
Error makes it conform to error interface
func (*JavaScriptError) WrappedError ¶
func (e *JavaScriptError) WrappedError() error
hackish way to get a wrapped error
type KillOperationCommand ¶
type KillOperationCommand struct { RavenCommandBase // contains filtered or unexported fields }
KillOperationCommand represents "kill operation" command
func NewKillOperationCommand ¶
func NewKillOperationCommand(id string) (*KillOperationCommand, error)
NewKillOperationCommand returns new KillOperationCommand
func (*KillOperationCommand) CreateRequest ¶
func (c *KillOperationCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type Lazy ¶
type Lazy struct { Value interface{} // contains filtered or unexported fields }
Lazy represents a lazy operation
func (*Lazy) GetValue ¶
GetValue executes lazy operation and ensures the Value is set in result variable provided in NewLazy()
func (*Lazy) IsValueCreated ¶
IsValueCreated returns true if lazy value has been created
type LazyAggregationQueryOperation ¶
type LazyAggregationQueryOperation struct {
// contains filtered or unexported fields
}
LazyAggregationQueryOperation represents lazy aggregation query operation
type LazyLoadOperation ¶
type LazyLoadOperation struct {
// contains filtered or unexported fields
}
LazyLoadOperation represents lazy load operation
type LazyMultiLoaderWithInclude ¶
type LazyMultiLoaderWithInclude struct {
// contains filtered or unexported fields
}
LazyMultiLoaderWithInclude is for lazily loading one or more objects with includes
func NewLazyMultiLoaderWithInclude ¶
func NewLazyMultiLoaderWithInclude(session *DocumentSession) *LazyMultiLoaderWithInclude
NewLazyMultiLoaderWithInclude creates a lazy multi loader with includes
func (*LazyMultiLoaderWithInclude) Include ¶
func (l *LazyMultiLoaderWithInclude) Include(path string) *LazyMultiLoaderWithInclude
Include adds ids of objects to add in a request
type LazyQueryOperation ¶
type LazyQueryOperation struct {
// contains filtered or unexported fields
}
LazyQueryOperation describes server operation for lazy queries
type LazySessionOperations ¶
type LazySessionOperations struct {
// contains filtered or unexported fields
}
LazySessionOperations describes API for lazy operations
func (*LazySessionOperations) Include ¶
func (o *LazySessionOperations) Include(path string) *LazyMultiLoaderWithInclude
Include adds a given object path to be included in results
func (*LazySessionOperations) LoadMulti ¶
func (o *LazySessionOperations) LoadMulti(ids []string) (*Lazy, error)
LoadMulti returns Lazy object for lazily loading multiple values of a given type and with given ids
func (*LazySessionOperations) LoadMultiWithEval ¶
func (o *LazySessionOperations) LoadMultiWithEval(ids []string, onEval func(), onEvalResult interface{}) (*Lazy, error)
func (*LazySessionOperations) LoadStartingWith ¶
func (o *LazySessionOperations) LoadStartingWith(args *StartsWithArgs) *Lazy
LoadStartingWith returns Lazy object for lazily loading multiple value of a given type and matching args results should be map[string]*Struct
func (*LazySessionOperations) LoadWithEval ¶
func (o *LazySessionOperations) LoadWithEval(id string, onEval func(), onEvalResult interface{}) (*Lazy, error)
type LazyStartsWithOperation ¶
type LazyStartsWithOperation struct {
// contains filtered or unexported fields
}
LazyStartsWithOperation represents lazy starts with operation
func NewLazyStartsWithOperation ¶
func NewLazyStartsWithOperation(idPrefix string, matches string, exclude string, start int, pageSize int, sessionOperations *InMemoryDocumentSessionOperations, startAfter string) *LazyStartsWithOperation
NewLazyStartsWithOperation returns new LazyStartsWithOperation TODO: convert to use StartsWithArgs
type LazySuggestionQueryOperation ¶
type LazySuggestionQueryOperation struct {
// contains filtered or unexported fields
}
type LeaderStamp ¶
type LeaderStamp struct { Index int64 `json:"Index"` Term int64 `json:"Term"` LeadersTicks int64 `json:"LeadersTicks"` }
LeaderStamp describes leader stamp
type LicenseActivationError ¶
type LicenseActivationError struct {
RavenError
}
func (*LicenseActivationError) Error ¶
func (e *LicenseActivationError) Error() string
Error makes it conform to error interface
func (*LicenseActivationError) WrappedError ¶
func (e *LicenseActivationError) WrappedError() error
hackish way to get a wrapped error
type LoadOperation ¶
type LoadOperation struct {
// contains filtered or unexported fields
}
LoadOperation represents a load operation
func NewLoadOperation ¶
func NewLoadOperation(session *InMemoryDocumentSessionOperations) *LoadOperation
type LoadStartingWithOperation ¶
type LoadStartingWithOperation struct { Command *GetDocumentsCommand // contains filtered or unexported fields }
func NewLoadStartingWithOperation ¶
func NewLoadStartingWithOperation(session *InMemoryDocumentSessionOperations) *LoadStartingWithOperation
type MaintenanceOperationExecutor ¶
type MaintenanceOperationExecutor struct {
// contains filtered or unexported fields
}
func NewMaintenanceOperationExecutor ¶
func NewMaintenanceOperationExecutor(store *DocumentStore, databaseName string) *MaintenanceOperationExecutor
func (*MaintenanceOperationExecutor) ForDatabase ¶
func (e *MaintenanceOperationExecutor) ForDatabase(databaseName string) *MaintenanceOperationExecutor
func (*MaintenanceOperationExecutor) GetRequestExecutor ¶
func (e *MaintenanceOperationExecutor) GetRequestExecutor() *RequestExecutor
func (*MaintenanceOperationExecutor) Send ¶
func (e *MaintenanceOperationExecutor) Send(operation IMaintenanceOperation) error
func (*MaintenanceOperationExecutor) SendAsync ¶
func (e *MaintenanceOperationExecutor) SendAsync(operation IMaintenanceOperation) (*Operation, error)
func (*MaintenanceOperationExecutor) Server ¶
func (e *MaintenanceOperationExecutor) Server() *ServerOperationExecutor
type MetadataAsDictionary ¶
type MetadataAsDictionary struct {
// contains filtered or unexported fields
}
MetadataAsDictionary describes metadata for a document
func NewMetadataAsDictionary ¶
func NewMetadataAsDictionary(metadata map[string]interface{}, parent *MetadataAsDictionary, parentKey string) *MetadataAsDictionary
NewMetadataAsDictionary returns MetadataAsDictionary based on a given metadata and parent
func NewMetadataAsDictionaryWithMetadata ¶
func NewMetadataAsDictionaryWithMetadata(metadata map[string]interface{}) *MetadataAsDictionary
NewMetadataAsDictionaryWithMetadata returns MetadataAsDictionary based on a given metadata
func NewMetadataAsDictionaryWithSource ¶
func NewMetadataAsDictionaryWithSource(metadata map[string]interface{}) *MetadataAsDictionary
NewMetadataAsDictionaryWithSource returns MetadataAsDictionary based on a given source
func (*MetadataAsDictionary) Clear ¶
func (d *MetadataAsDictionary) Clear()
Clear removes all metadata
func (*MetadataAsDictionary) ContainsKey ¶
func (d *MetadataAsDictionary) ContainsKey(key string) bool
ContainsKey returns true if we have metadata value with a given key
func (*MetadataAsDictionary) ConvertValue ¶
func (d *MetadataAsDictionary) ConvertValue(key string, value interface{}) interface{}
ConvertValue converts value with a given key to a desired type
func (*MetadataAsDictionary) EntrySet ¶
func (d *MetadataAsDictionary) EntrySet() map[string]interface{}
EntrySet returns metadata as map[string]interface{}
func (*MetadataAsDictionary) Get ¶
func (d *MetadataAsDictionary) Get(key string) (interface{}, bool)
Get returns metadata value with a given key
func (*MetadataAsDictionary) GetObjects ¶
func (d *MetadataAsDictionary) GetObjects(key string) []*MetadataAsDictionary
GetObjects returns metadata info for a given key TODO: return an error instead of panicking on cast failures?
func (*MetadataAsDictionary) IsDirty ¶
func (d *MetadataAsDictionary) IsDirty() bool
IsDirty returns if we're dirty
func (*MetadataAsDictionary) IsEmpty ¶
func (d *MetadataAsDictionary) IsEmpty() bool
func (*MetadataAsDictionary) KeySet ¶
func (d *MetadataAsDictionary) KeySet() []string
KeySet returns all keys
func (*MetadataAsDictionary) MarkDirty ¶
func (d *MetadataAsDictionary) MarkDirty()
MarkDirty marks us as dirty
func (*MetadataAsDictionary) Put ¶
func (d *MetadataAsDictionary) Put(key string, value interface{}) interface{}
Put inserts a given value with a given key
func (*MetadataAsDictionary) Remove ¶
func (d *MetadataAsDictionary) Remove(key string)
func (*MetadataAsDictionary) Size ¶
func (d *MetadataAsDictionary) Size() int
Size returns number of metadata items
type MethodCall ¶
type MethodCall interface { }
type MethodCallData ¶
type MethodCallData struct {
// contains filtered or unexported fields
}
type MethodsType ¶
type MethodsType = string
type ModifyOngoingTaskResult ¶
type ModifyOngoingTaskResult struct { TaskID int64 `json:"TaskId"` RaftCommandIndex int64 `json:"RaftCommandIndex"` ResponsibleNode string `json:"ResponsibleNode"` }
ModifyOngoingTaskResult represents a raven server command for modyfing task result
type MoreLikeThisBase ¶
type MoreLikeThisBase interface { GetOptions() *MoreLikeThisOptions SetOptions(options *MoreLikeThisOptions) }
type MoreLikeThisBuilder ¶
type MoreLikeThisBuilder struct {
// contains filtered or unexported fields
}
func NewMoreLikeThisBuilder ¶
func NewMoreLikeThisBuilder() *MoreLikeThisBuilder
func (*MoreLikeThisBuilder) GetMoreLikeThis ¶
func (b *MoreLikeThisBuilder) GetMoreLikeThis() MoreLikeThisBase
func (*MoreLikeThisBuilder) UsingAnyDocument ¶
func (b *MoreLikeThisBuilder) UsingAnyDocument() IMoreLikeThisOperations
func (*MoreLikeThisBuilder) UsingDocument ¶
func (b *MoreLikeThisBuilder) UsingDocument(documentJSON string) IMoreLikeThisOperations
func (*MoreLikeThisBuilder) UsingDocumentWithBuilder ¶
func (b *MoreLikeThisBuilder) UsingDocumentWithBuilder(builder func(*DocumentQuery)) IMoreLikeThisOperations
func (*MoreLikeThisBuilder) WithOptions ¶
func (b *MoreLikeThisBuilder) WithOptions(options *MoreLikeThisOptions) IMoreLikeThisOperations
type MoreLikeThisCommon ¶
type MoreLikeThisCommon struct {
// contains filtered or unexported fields
}
func (*MoreLikeThisCommon) GetOptions ¶
func (c *MoreLikeThisCommon) GetOptions() *MoreLikeThisOptions
func (*MoreLikeThisCommon) SetOptions ¶
func (c *MoreLikeThisCommon) SetOptions(options *MoreLikeThisOptions)
type MoreLikeThisOptions ¶
type MoreLikeThisOptions struct { MinimumTermFrequency *int `json:"MinimumTermFrequency"` MaximumQueryTerms *int `json:"MaximumQueryTerms"` MaximumNumberOfTokensParsed *int `json:"MaximumNumberOfTokensParsed"` MinimumWordLength *int `json:"MinimumWordLength"` MaximumWordLength *int `json:"MaximumWordLength"` MinimumDocumentFrequency *int `json:"MinimumDocumentFrequency"` MaximumDocumentFrequency *int `json:"MaximumDocumentFrequency"` MaximumDocumentFrequencyPercentage *int `json:"MaximumDocumentFrequencyPercentage"` Boost *bool `json:"Boost"` BoostFactor *float32 `json:"BoostFactor"` StopWordsDocumentID *string `json:"StopWordsDocumentId"` Fields []string `json:"Fields"` }
func NewMoreLikeThisOptions ¶
func NewMoreLikeThisOptions() *MoreLikeThisOptions
func (*MoreLikeThisOptions) SetBoost ¶
func (o *MoreLikeThisOptions) SetBoost(boost bool)
func (*MoreLikeThisOptions) SetBoostFactor ¶
func (o *MoreLikeThisOptions) SetBoostFactor(boostFactor float32)
func (*MoreLikeThisOptions) SetMaximumDocumentFrequency ¶
func (o *MoreLikeThisOptions) SetMaximumDocumentFrequency(maximumDocumentFrequency int)
func (*MoreLikeThisOptions) SetMaximumDocumentFrequencyPercentage ¶
func (o *MoreLikeThisOptions) SetMaximumDocumentFrequencyPercentage(maximumDocumentFrequencyPercentage int)
func (*MoreLikeThisOptions) SetMaximumNumberOfTokensParsed ¶
func (o *MoreLikeThisOptions) SetMaximumNumberOfTokensParsed(maximumNumberOfTokensParsed int)
func (*MoreLikeThisOptions) SetMaximumQueryTerms ¶
func (o *MoreLikeThisOptions) SetMaximumQueryTerms(maximumQueryTerms int)
func (*MoreLikeThisOptions) SetMaximumWordLength ¶
func (o *MoreLikeThisOptions) SetMaximumWordLength(maximumWordLength int)
func (*MoreLikeThisOptions) SetMinimumDocumentFrequency ¶
func (o *MoreLikeThisOptions) SetMinimumDocumentFrequency(minimumDocumentFrequency int)
func (*MoreLikeThisOptions) SetMinimumTermFrequency ¶
func (o *MoreLikeThisOptions) SetMinimumTermFrequency(minimumTermFrequency int)
func (*MoreLikeThisOptions) SetMinimumWordLength ¶
func (o *MoreLikeThisOptions) SetMinimumWordLength(minimumWordLength int)
func (*MoreLikeThisOptions) SetStopWordsDocumentID ¶
func (o *MoreLikeThisOptions) SetStopWordsDocumentID(stopWordsDocumentID string)
type MoreLikeThisQueryResult ¶
type MoreLikeThisQueryResult struct { DurationInMs int64 `json:"DurationInMs"` // contains filtered or unexported fields }
MoreLikeThisQueryResult describes result of "more like this" operation
type MoreLikeThisStopWords ¶
type MoreLikeThisUsingAnyDocument ¶
type MoreLikeThisUsingAnyDocument struct {
MoreLikeThisCommon
}
func NewMoreLikeThisUsingAnyDocument ¶
func NewMoreLikeThisUsingAnyDocument() *MoreLikeThisUsingAnyDocument
type MoreLikeThisUsingDocument ¶
type MoreLikeThisUsingDocument struct { MoreLikeThisCommon // contains filtered or unexported fields }
MoreLikeThisUsingDocument represents more like this with a document
type MoreLikeThisUsingDocumentForDocumentQuery ¶
type MoreLikeThisUsingDocumentForDocumentQuery struct { MoreLikeThisCommon // contains filtered or unexported fields }
func NewMoreLikeThisUsingDocumentForDocumentQuery ¶
func NewMoreLikeThisUsingDocumentForDocumentQuery() *MoreLikeThisUsingDocumentForDocumentQuery
func (*MoreLikeThisUsingDocumentForDocumentQuery) GetForDocumentQuery ¶
func (m *MoreLikeThisUsingDocumentForDocumentQuery) GetForDocumentQuery() func(*DocumentQuery)
type MultiDatabaseHiLoIDGenerator ¶
type MultiDatabaseHiLoIDGenerator struct {
// contains filtered or unexported fields
}
MultiDatabaseHiLoIDGenerator manages per-database HiLoKeyGenerotr
func NewMultiDatabaseHiLoIDGenerator ¶
func NewMultiDatabaseHiLoIDGenerator(store *DocumentStore, conventions *DocumentConventions) *MultiDatabaseHiLoIDGenerator
NewMultiDatabaseHiLoIDGenerator creates new MultiDatabaseHiLoKeyGenerator
func (*MultiDatabaseHiLoIDGenerator) GenerateDocumentID ¶
func (g *MultiDatabaseHiLoIDGenerator) GenerateDocumentID(dbName string, entity interface{}) (string, error)
GenerateDocumentID generates id
func (*MultiDatabaseHiLoIDGenerator) ReturnUnusedRange ¶
func (g *MultiDatabaseHiLoIDGenerator) ReturnUnusedRange()
ReturnUnusedRange returns unused range for all generators
type MultiGetCommand ¶
type MultiGetCommand struct { RavenCommandBase Result []*GetResponse // in Java we inherit from List<GetResponse> // contains filtered or unexported fields }
MultiGetCommand represents multi get command
func (*MultiGetCommand) CreateRequest ¶
func (c *MultiGetCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*MultiGetCommand) SetResponseRaw ¶
type MultiGetOperation ¶
type MultiGetOperation struct {
// contains filtered or unexported fields
}
MultiGetOperation represents multi-get operation
type MultiLoaderWithInclude ¶
type MultiLoaderWithInclude struct {
// contains filtered or unexported fields
}
func NewMultiLoaderWithInclude ¶
func NewMultiLoaderWithInclude(session *DocumentSession) *MultiLoaderWithInclude
func (*MultiLoaderWithInclude) Include ¶
func (l *MultiLoaderWithInclude) Include(path string) *MultiLoaderWithInclude
func (*MultiLoaderWithInclude) Load ¶
func (l *MultiLoaderWithInclude) Load(result interface{}, id string) error
TODO: needs a test TODO: better implementation
func (*MultiLoaderWithInclude) LoadMulti ¶
func (l *MultiLoaderWithInclude) LoadMulti(results interface{}, ids []string) error
results should be map[string]*struct
type MultiTypeHiLoIDGenerator ¶
type MultiTypeHiLoIDGenerator struct {
// contains filtered or unexported fields
}
MultiTypeHiLoIDGenerator manages per-type HiLoKeyGenerator
func NewMultiTypeHiLoIDGenerator ¶
func NewMultiTypeHiLoIDGenerator(store *DocumentStore, dbName string, conventions *DocumentConventions) *MultiTypeHiLoIDGenerator
NewMultiTypeHiLoIDGenerator creates MultiTypeHiLoKeyGenerator
func (*MultiTypeHiLoIDGenerator) GenerateDocumentID ¶
func (g *MultiTypeHiLoIDGenerator) GenerateDocumentID(entity interface{}) (string, error)
GenerateDocumentID generates a unique key for entity using its type to partition keys
func (*MultiTypeHiLoIDGenerator) ReturnUnusedRange ¶
func (g *MultiTypeHiLoIDGenerator) ReturnUnusedRange()
ReturnUnusedRange returns unused range for all generators
type NextHiLoCommand ¶
type NextHiLoCommand struct { RavenCommandBase Result *HiLoResult // contains filtered or unexported fields }
NextHiLoCommand represents a hi-lo database command
func NewNextHiLoCommand ¶
func NewNextHiLoCommand(tag string, lastBatchSize int64, lastRangeAt *time.Time, identityPartsSeparator string, lastRangeMax int64) *NextHiLoCommand
NewNextHiLoCommand returns new NextHiLoCommand
func (*NextHiLoCommand) CreateRequest ¶
func (c *NextHiLoCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*NextHiLoCommand) SetResponse ¶
func (c *NextHiLoCommand) SetResponse(response []byte, fromCache bool) error
type NextIdentityForCommand ¶
type NextIdentityForCommand struct { RavenCommandBase Result int // contains filtered or unexported fields }
func NewNextIdentityForCommand ¶
func NewNextIdentityForCommand(id string) *NextIdentityForCommand
func (*NextIdentityForCommand) CreateRequest ¶
func (c *NextIdentityForCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*NextIdentityForCommand) SetResponse ¶
func (c *NextIdentityForCommand) SetResponse(response []byte, fromCache bool) error
type NoLeaderError ¶
type NoLeaderError struct {
RavenError
}
func (*NoLeaderError) Error ¶
func (e *NoLeaderError) Error() string
Error makes it conform to error interface
func (*NoLeaderError) WrappedError ¶
func (e *NoLeaderError) WrappedError() error
hackish way to get a wrapped error
type NodeID ¶
type NodeID struct { NodeTag string `json:"NodeTag"` NodeURL string `json:"NodeUrl"` ResponsibleNode string `json:"ResponsibleNode"` }
NodeID describes a node
type NodeIsPassiveError ¶
type NodeIsPassiveError struct {
RavenError
}
func (*NodeIsPassiveError) Error ¶
func (e *NodeIsPassiveError) Error() string
Error makes it conform to error interface
func (*NodeIsPassiveError) WrappedError ¶
func (e *NodeIsPassiveError) WrappedError() error
hackish way to get a wrapped error
type NodeSelector ¶
type NodeSelector struct {
// contains filtered or unexported fields
}
NodeSelector describes node selector
func NewNodeSelector ¶
func NewNodeSelector(t *Topology) *NodeSelector
NewNodeSelector creates a new NodeSelector
func (*NodeSelector) Close ¶
func (s *NodeSelector) Close()
type NodeSelectorState ¶
type NodeSelectorState struct {
// contains filtered or unexported fields
}
func NewNodeSelectorState ¶
func NewNodeSelectorState(topology *Topology) *NodeSelectorState
type NodeStatus ¶
type NodeStatus struct {
// contains filtered or unexported fields
}
NodeStatus represents status of server node
func NewNodeStatus ¶
func NewNodeStatus(requestExecutor *RequestExecutor, nodeIndex int, node *ServerNode) *NodeStatus
func (*NodeStatus) Close ¶
func (s *NodeStatus) Close()
type NonUniqueObjectError ¶
type NonUniqueObjectError struct {
RavenError
}
NonUniqueObjectError represents non unique object error
func (*NonUniqueObjectError) Error ¶
func (e *NonUniqueObjectError) Error() string
Error makes it conform to error interface
func (*NonUniqueObjectError) WrappedError ¶
func (e *NonUniqueObjectError) WrappedError() error
hackish way to get a wrapped error
type NotImplementedError ¶
type NotImplementedError struct {
// contains filtered or unexported fields
}
NotImplementedError represents not implemented error
func (*NotImplementedError) Error ¶
func (e *NotImplementedError) Error() string
Error makes it conform to error interface
func (*NotImplementedError) WrappedError ¶
func (e *NotImplementedError) WrappedError() error
hackish way to get a wrapped error
type Operation ¶
type Operation struct { // if true, this represents ServerWideOperation IsServerWide bool // contains filtered or unexported fields }
Operation describes async operation being executed on the server
func NewOperation ¶
func NewOperation(requestExecutor *RequestExecutor, changes func() *DatabaseChanges, conventions *DocumentConventions, id int64) *Operation
func NewServerWideOperation ¶
func NewServerWideOperation(requestExecutor *RequestExecutor, conventions *DocumentConventions, id int64) *Operation
func (*Operation) WaitForCompletion ¶
type OperationCancelledError ¶
type OperationCancelledError struct {
// contains filtered or unexported fields
}
OperationCancelledError represents "operation cancelled" error
func (*OperationCancelledError) Error ¶
func (e *OperationCancelledError) Error() string
Error makes it conform to error interface
func (*OperationCancelledError) WrappedError ¶
func (e *OperationCancelledError) WrappedError() error
hackish way to get a wrapped error
type OperationExceptionResult ¶
type OperationExceptionResult struct { Type string `json:"Type"` Message string `json:"Message"` Error string `json:"Error"` StatusCode int `json:"StatusCode"` }
OperationExceptionResult represents an exception information from the server
type OperationExecutor ¶
type OperationExecutor struct {
// contains filtered or unexported fields
}
func NewOperationExecutor ¶
func NewOperationExecutor(store *DocumentStore, databaseName string) *OperationExecutor
func (*OperationExecutor) ForDatabase ¶
func (e *OperationExecutor) ForDatabase(databaseName string) *OperationExecutor
func (*OperationExecutor) Send ¶
func (e *OperationExecutor) Send(operation IOperation, sessionInfo *SessionInfo) error
Note: we don't return a result because we could only return interface{} The caller has access to operation and can access strongly typed command and its result sessionInfo can be nil
func (*OperationExecutor) SendAsync ¶
func (e *OperationExecutor) SendAsync(operation IOperation, sessionInfo *SessionInfo) (*Operation, error)
sessionInfo can be nil
func (*OperationExecutor) SendPatchOperation ¶
func (e *OperationExecutor) SendPatchOperation(operation *PatchOperation, sessionInfo *SessionInfo) (*PatchOperationResult, error)
type OperationIDResult ¶
type OperationIDResult struct {
OperationID int64 `json:"OperationId"`
}
OperationIDResult is a result of commands like CompactDatabaseCommand
type OperationStatusChange ¶
OperationStatusChange describes a change to the operation status. Can be used as DatabaseChange.
type OrderingType ¶
type OrderingType = string
type Parameters ¶
type Parameters = map[string]interface{}
type PatchByQueryCommand ¶
type PatchByQueryCommand struct { RavenCommandBase Result *OperationIDResult // contains filtered or unexported fields }
func NewPatchByQueryCommand ¶
func NewPatchByQueryCommand(conventions *DocumentConventions, queryToUpdate *IndexQuery, options *QueryOperationOptions) (*PatchByQueryCommand, error)
func (*PatchByQueryCommand) CreateRequest ¶
func (c *PatchByQueryCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PatchByQueryCommand) SetResponse ¶
func (c *PatchByQueryCommand) SetResponse(response []byte, fromCache bool) error
type PatchByQueryOperation ¶
type PatchByQueryOperation struct { Command *PatchByQueryCommand // contains filtered or unexported fields }
func NewPatchByQueryOperation ¶
func NewPatchByQueryOperation(queryToUpdate string) *PatchByQueryOperation
func NewPatchByQueryOperationWithOptions ¶
func NewPatchByQueryOperationWithOptions(queryToUpdate string, options *QueryOperationOptions) *PatchByQueryOperation
func (*PatchByQueryOperation) GetCommand ¶
func (o *PatchByQueryOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type PatchCommand ¶
type PatchCommand struct { RavenCommandBase Result *PatchResult // contains filtered or unexported fields }
PatchCommand represents patch command
func NewPatchCommand ¶
func NewPatchCommand(conventions *DocumentConventions, id string, changeVector *string, patch *PatchRequest, patchIfMissing *PatchRequest, skipPatchIfChangeVectorMismatch bool, returnDebugInformation bool, test bool) (*PatchCommand, error)
NewPatchCommand returns new PatchCommand
func (*PatchCommand) CreateRequest ¶
func (c *PatchCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PatchCommand) SetResponse ¶
func (c *PatchCommand) SetResponse(response []byte, fromCache bool) error
type PatchCommandData ¶
type PatchCommandData struct { *CommandData // contains filtered or unexported fields }
type PatchOperation ¶
type PatchOperation struct { Command *PatchCommand // contains filtered or unexported fields }
PatchOperation represents patch operation
func NewPatchOperation ¶
func NewPatchOperation(id string, changeVector *string, patch *PatchRequest, patchIfMissing *PatchRequest, skipPatchIfChangeVectorMismatch bool) (*PatchOperation, error)
NewPatchOperation returns new PatchOperation
func (*PatchOperation) GetCommand ¶
func (o *PatchOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type PatchOperationPayload ¶
type PatchOperationPayload struct {
// contains filtered or unexported fields
}
PatchOperationPayload represents payload of patch operation Note: in Java it's Payload nested in PatchOperation
type PatchOperationResult ¶
type PatchOperationResult struct { Status PatchStatus `json:"Status"` Document map[string]interface{} `json:"Document"` }
PatchOperationResult represents result of patch operation Note: in Java it's Result nested in PatchOperation
func (*PatchOperationResult) GetResult ¶
func (r *PatchOperationResult) GetResult(result interface{}) error
type PatchRequest ¶
PatchRequest represents patch request
func (*PatchRequest) Serialize ¶
func (r *PatchRequest) Serialize() map[string]interface{}
Serialize serializes PatchRequest to json
type PatchResult ¶
type PatchResult struct { Status PatchStatus `json:"Status"` ModifiedDocument map[string]interface{} `json:"ModifiedDocument"` OriginalDocument map[string]interface{} `json:"OriginalDocument"` Debug map[string]interface{} `json:"Debug"` // TODO: can this ever be null? If not, use string for type ChangeVector *string `json:"ChangeVector"` Collection string `json:"Collection"` }
PatchResult describes server results of patch command
type PatchStatus ¶
type PatchStatus = string
type PointField ¶
type PointField struct {
// contains filtered or unexported fields
}
func NewPointField ¶
func NewPointField(latitude string, longitude string) *PointField
type PutAttachmentCommand ¶
type PutAttachmentCommand struct { RavenCommandBase Result *AttachmentDetails // contains filtered or unexported fields }
func NewPutAttachmentCommand ¶
func NewPutAttachmentCommand(documentID string, name string, stream io.Reader, contentType string, changeVector *string) (*PutAttachmentCommand, error)
TODO: should stream be io.ReadCloser? Who owns closing the attachment
func (*PutAttachmentCommand) CreateRequest ¶
func (c *PutAttachmentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PutAttachmentCommand) SetResponse ¶
func (c *PutAttachmentCommand) SetResponse(response []byte, fromCache bool) error
type PutAttachmentCommandData ¶
type PutAttachmentCommandData struct { *CommandData // contains filtered or unexported fields }
func (*PutAttachmentCommandData) GetContentType ¶
func (d *PutAttachmentCommandData) GetContentType() string
type PutAttachmentOperation ¶
type PutAttachmentOperation struct { Command *PutAttachmentCommand // contains filtered or unexported fields }
func (*PutAttachmentOperation) GetCommand ¶
func (o *PutAttachmentOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type PutClientConfigurationCommand ¶
type PutClientConfigurationCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewPutClientConfigurationCommand ¶
func NewPutClientConfigurationCommand(conventions *DocumentConventions, configuration *ClientConfiguration) (*PutClientConfigurationCommand, error)
func (*PutClientConfigurationCommand) CreateRequest ¶
func (c *PutClientConfigurationCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type PutClientConfigurationOperation ¶
type PutClientConfigurationOperation struct { Command *PutClientConfigurationCommand // contains filtered or unexported fields }
func NewPutClientConfigurationOperation ¶
func NewPutClientConfigurationOperation(configuration *ClientConfiguration) (*PutClientConfigurationOperation, error)
func (*PutClientConfigurationOperation) GetCommand ¶
func (o *PutClientConfigurationOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type PutCommandDataWithJSON ¶
type PutCommandDataWithJSON struct { *CommandData // contains filtered or unexported fields }
PutCommandDataWithJSON represents data for put command with json
type PutCompareExchangeCommandData ¶
type PutCompareExchangeCommandData struct { *CommandData // contains filtered or unexported fields }
type PutCompareExchangeValueCommand ¶
type PutCompareExchangeValueCommand struct { RavenCommandBase Result *CompareExchangeResult // contains filtered or unexported fields }
func NewPutCompareExchangeValueCommand ¶
func NewPutCompareExchangeValueCommand(key string, value interface{}, index int64, conventions *DocumentConventions) (*PutCompareExchangeValueCommand, error)
func (*PutCompareExchangeValueCommand) CreateRequest ¶
func (c *PutCompareExchangeValueCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PutCompareExchangeValueCommand) SetResponse ¶
func (c *PutCompareExchangeValueCommand) SetResponse(response []byte, fromCache bool) error
type PutCompareExchangeValueOperation ¶
type PutCompareExchangeValueOperation struct { Command *PutCompareExchangeValueCommand // contains filtered or unexported fields }
func NewPutCompareExchangeValueOperation ¶
func NewPutCompareExchangeValueOperation(key string, value interface{}, index int64) (*PutCompareExchangeValueOperation, error)
func (*PutCompareExchangeValueOperation) GetCommand ¶
func (o *PutCompareExchangeValueOperation) GetCommand(store *DocumentStore, conventions *DocumentConventions, cache *httpCache) (RavenCommand, error)
type PutConnectionStringCommand ¶
type PutConnectionStringCommand struct { RavenCommandBase Result *PutConnectionStringResult // contains filtered or unexported fields }
func NewPutConnectionStringCommand ¶
func NewPutConnectionStringCommand(connectionString interface{}) *PutConnectionStringCommand
connectionString should be ConnectionString or RavenConnectionString
func (*PutConnectionStringCommand) CreateRequest ¶
func (c *PutConnectionStringCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PutConnectionStringCommand) SetResponse ¶
func (c *PutConnectionStringCommand) SetResponse(response []byte, fromCache bool) error
type PutConnectionStringOperation ¶
type PutConnectionStringOperation struct { Command *PutConnectionStringCommand // contains filtered or unexported fields }
func NewPutConnectionStringOperation ¶
func NewPutConnectionStringOperation(connectionString interface{}) *PutConnectionStringOperation
func (*PutConnectionStringOperation) GetCommand ¶
func (o *PutConnectionStringOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type PutConnectionStringResult ¶
type PutConnectionStringResult struct {
Etag int64 `json:"ETag"`
}
PutConnectionStringResult describes result of "put connection" command
type PutDocumentCommand ¶
type PutDocumentCommand struct { RavenCommandBase Result *PutResult // contains filtered or unexported fields }
func NewPutDocumentCommand ¶
func NewPutDocumentCommand(id string, changeVector *string, document map[string]interface{}) *PutDocumentCommand
func (*PutDocumentCommand) CreateRequest ¶
func (c *PutDocumentCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PutDocumentCommand) SetResponse ¶
func (c *PutDocumentCommand) SetResponse(response []byte, fromCache bool) error
type PutIndexResult ¶
type PutIndexResult struct { // Note: don't know how Java does it, but this is sent // as Index in JSON responses from the server IndexName string `json:"Index"` }
PutIndexResult represents result of put index command
type PutIndexesCommand ¶
type PutIndexesCommand struct { RavenCommandBase Result []*PutIndexResult // contains filtered or unexported fields }
PutIndexesCommand represents put indexes command
func NewPutIndexesCommand ¶
func NewPutIndexesCommand(conventions *DocumentConventions, indexesToAdd []*IndexDefinition) (*PutIndexesCommand, error)
NewPutIndexesCommand returns new PutIndexesCommand
func (*PutIndexesCommand) CreateRequest ¶
func (c *PutIndexesCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*PutIndexesCommand) SetResponse ¶
func (c *PutIndexesCommand) SetResponse(response []byte, fromCache bool) error
type PutIndexesOperation ¶
type PutIndexesOperation struct { Command *PutIndexesCommand // contains filtered or unexported fields }
PutIndexesOperation represents put indexes operation
func NewPutIndexesOperation ¶
func NewPutIndexesOperation(indexToAdd ...*IndexDefinition) *PutIndexesOperation
NewPutIndexesOperation returns new PutIndexesOperation
func (*PutIndexesOperation) GetCommand ¶
func (o *PutIndexesOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns a command for this operation
type PutIndexesResponse ¶
type PutIndexesResponse struct {
Results []*PutIndexResult `json:"Results"`
}
PutIndexesResponse represents server's response to PutIndexesCommand
type QueryCommand ¶
type QueryCommand struct { RavenCommandBase Result *QueryResult // contains filtered or unexported fields }
func NewQueryCommand ¶
func NewQueryCommand(conventions *DocumentConventions, indexQuery *IndexQuery, metadataOnly bool, indexEntriesOnly bool) (*QueryCommand, error)
func (*QueryCommand) CreateRequest ¶
func (c *QueryCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*QueryCommand) SetResponse ¶
func (c *QueryCommand) SetResponse(response []byte, fromCache bool) error
type QueryData ¶
type QueryData struct { // Fields lists fields to be selected from queried document Fields []string // Projections lists fields in the result entity Projections []string // contains filtered or unexported fields }
QueryData represents
type QueryOperationOptions ¶
type QueryOperationOptions struct { MaxOpsPerSecond int AllowStale bool StaleTimeout time.Duration RetrieveDetails bool }
QueryOperationOptions represents options for query operation
type QueryOperator ¶
type QueryOperator string
type QueryResult ¶
type QueryResult struct {
GenericQueryResult
}
QueryResults represents results of a query
type QueryStatistics ¶
type QueryStatistics struct { IsStale bool DurationInMs int64 TotalResults int SkippedResults int Timestamp time.Time IndexName string IndexTimestamp time.Time LastQueryTime time.Time TimingsInMs map[string]float64 ResultEtag int64 // TODO: *int64 ? ResultSize int64 ScoreExplanations map[string]string }
TODO: is time.Time here our *Time? TODO: needs json annotations?
func NewQueryStatistics ¶
func NewQueryStatistics() *QueryStatistics
func (*QueryStatistics) UpdateQueryStats ¶
func (s *QueryStatistics) UpdateQueryStats(qr *QueryResult)
type QueryStreamCommand ¶
type QueryStreamCommand struct { RavenCommandBase Result *StreamResultResponse // contains filtered or unexported fields }
func NewQueryStreamCommand ¶
func NewQueryStreamCommand(conventions *DocumentConventions, indexQuery *IndexQuery) *QueryStreamCommand
func (*QueryStreamCommand) CreateRequest ¶
func (c *QueryStreamCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type RaftCommandBase ¶
type RaftCommandBase struct { RavenCommandBase // contains filtered or unexported fields }
func (*RaftCommandBase) RaftUniqueRequestId ¶
func (cmd *RaftCommandBase) RaftUniqueRequestId() (string, error)
type RangeBuilder ¶
type RangeBuilder struct {
// contains filtered or unexported fields
}
RangeBuilder helps build a string query for range requests
func NewRangeBuilder ¶
func NewRangeBuilder(path string) *RangeBuilder
func (*RangeBuilder) Err ¶
func (b *RangeBuilder) Err() error
func (*RangeBuilder) GetStringRepresentation ¶
func (b *RangeBuilder) GetStringRepresentation(addQueryParameter func(interface{}) string) (string, error)
func (*RangeBuilder) IsGreaterThan ¶
func (b *RangeBuilder) IsGreaterThan(value interface{}) *RangeBuilder
func (*RangeBuilder) IsGreaterThanOrEqualTo ¶
func (b *RangeBuilder) IsGreaterThanOrEqualTo(value interface{}) *RangeBuilder
func (*RangeBuilder) IsLessThan ¶
func (b *RangeBuilder) IsLessThan(value interface{}) *RangeBuilder
func (*RangeBuilder) IsLessThanOrEqualTo ¶
func (b *RangeBuilder) IsLessThanOrEqualTo(value interface{}) *RangeBuilder
type RangeFacet ¶
type RangeFacet struct { FacetBaseCommon Ranges []string `json:"Ranges"` // contains filtered or unexported fields }
RangeFacet describes range facet
func NewRangeFacet ¶
func NewRangeFacet(parent FacetBase) *RangeFacet
NewRangeFacet returns new RangeFacet parent is optional (can be nil)
func (*RangeFacet) ToFacetToken ¶
func (f *RangeFacet) ToFacetToken(addQueryParameter func(interface{}) string) (*facetToken, error)
ToFacetToken converts RangeFacet to a token
type RangeValue ¶
RangeValue represents an inclusive integer range min to max
func NewRangeValue ¶
func NewRangeValue(min int64, max int64) *RangeValue
NewRangeValue creates a new RangeValue
type RavenCommand ¶
type RavenCommand interface { // those are meant to be over-written CreateRequest(node *ServerNode) (*http.Request, error) SetResponse(response []byte, fromCache bool) error SetResponseRaw(response *http.Response, body io.Reader) error Send(client *http.Client, req *http.Request) (*http.Response, error) // for all other functions, get access to underlying RavenCommandBase GetBase() *RavenCommandBase }
RavenCommand defines interface for server commands
type RavenCommandBase ¶
type RavenCommandBase struct { StatusCode int ResponseType RavenCommandResponseType CanCache bool CanCacheAggressively bool // if true, can be cached IsReadRequest bool FailedNodes map[*ServerNode]error }
func NewRavenCommandBase ¶
func NewRavenCommandBase() RavenCommandBase
func (*RavenCommandBase) CreateRequest ¶
func (c *RavenCommandBase) CreateRequest(node *ServerNode) (*http.Request, error)
func (*RavenCommandBase) GetBase ¶
func (c *RavenCommandBase) GetBase() *RavenCommandBase
func (*RavenCommandBase) SetResponse ¶
func (c *RavenCommandBase) SetResponse(response []byte, fromCache bool) error
func (*RavenCommandBase) SetResponseRaw ¶
type RavenCommandResponseType ¶
type RavenCommandResponseType = string
type RavenConnectionString ¶
type RavenConnectionString struct { ConnectionString Database string `json:"Database"` TopologyDiscoveryUrls []string `json:"TopologyDiscoveryUrls"` }
RavenConnectionString represents connection string for raven
func NewRavenConnectionString ¶
func NewRavenConnectionString() *RavenConnectionString
type RavenError ¶
type RavenError struct {
// contains filtered or unexported fields
}
RavenError represents generic raven error all exceptions that in Java extend RavenException should contain this error
func (*RavenError) Error ¶
func (e *RavenError) Error() string
Error makes it conform to error interface
func (*RavenError) WrappedError ¶
func (e *RavenError) WrappedError() error
hackish way to get a wrapped error
type RawDocumentQuery ¶
type RawDocumentQuery struct {
// contains filtered or unexported fields
}
func (*RawDocumentQuery) AddAfterQueryExecutedListener ¶
func (q *RawDocumentQuery) AddAfterQueryExecutedListener(action func(*QueryResult)) int
func (*RawDocumentQuery) AddAfterStreamExecutedListener ¶
func (q *RawDocumentQuery) AddAfterStreamExecutedListener(action func(map[string]interface{})) int
func (*RawDocumentQuery) AddBeforeQueryExecutedListener ¶
func (q *RawDocumentQuery) AddBeforeQueryExecutedListener(action func(*IndexQuery)) int
func (*RawDocumentQuery) AddParameter ¶
func (q *RawDocumentQuery) AddParameter(name string, value interface{}) *RawDocumentQuery
func (RawDocumentQuery) CountLazily ¶
CountLazily returns a lazy operation that returns number of results in a query. It'll set *count to number of results after Lazy.GetResult() is called. results should be of type []<type> and is only provided so that we know this is a query for <type> TODO: figure out better API.
func (RawDocumentQuery) First ¶
func (q RawDocumentQuery) First(result interface{}) error
First runs a query and returns a first result.
func (RawDocumentQuery) GetIndexQuery ¶
func (q RawDocumentQuery) GetIndexQuery() (*IndexQuery, error)
func (RawDocumentQuery) GetResults ¶
func (q RawDocumentQuery) GetResults(results interface{}) error
GetResults executes the query and sets results to returned values. results should be of type *[]<type>
func (*RawDocumentQuery) NoCaching ¶
func (q *RawDocumentQuery) NoCaching() *RawDocumentQuery
func (*RawDocumentQuery) NoTracking ¶
func (q *RawDocumentQuery) NoTracking() *RawDocumentQuery
func (*RawDocumentQuery) RemoveAfterQueryExecutedListener ¶
func (q *RawDocumentQuery) RemoveAfterQueryExecutedListener(idx int) *RawDocumentQuery
func (*RawDocumentQuery) RemoveAfterStreamExecutedListener ¶
func (q *RawDocumentQuery) RemoveAfterStreamExecutedListener(idx int) *RawDocumentQuery
func (*RawDocumentQuery) RemoveBeforeQueryExecutedListener ¶
func (q *RawDocumentQuery) RemoveBeforeQueryExecutedListener(idx int) *RawDocumentQuery
func (RawDocumentQuery) Single ¶
func (q RawDocumentQuery) Single(result interface{}) error
Single runs a query that expects only a single result. If there is more than one result, it returns IllegalStateError.
func (*RawDocumentQuery) Skip ¶
func (q *RawDocumentQuery) Skip(count int) *RawDocumentQuery
func (*RawDocumentQuery) Statistics ¶
func (q *RawDocumentQuery) Statistics(stats **QueryStatistics) *RawDocumentQuery
func (*RawDocumentQuery) Take ¶
func (q *RawDocumentQuery) Take(count int) *RawDocumentQuery
func (*RawDocumentQuery) UsingDefaultOperator ¶
func (q *RawDocumentQuery) UsingDefaultOperator(queryOperator QueryOperator) *RawDocumentQuery
func (*RawDocumentQuery) WaitForNonStaleResults ¶
func (q *RawDocumentQuery) WaitForNonStaleResults() *RawDocumentQuery
func (*RawDocumentQuery) WaitForNonStaleResultsWithTimeout ¶
func (q *RawDocumentQuery) WaitForNonStaleResultsWithTimeout(waitTimeout time.Duration) *RawDocumentQuery
type ReadBalanceBehavior ¶
type ReadBalanceBehavior = string
ReadBalanceBehavior defines the type of read balancing
type RemoveCompareExchangeValueCommand ¶
type RemoveCompareExchangeValueCommand struct { RavenCommandBase Result *CompareExchangeResult // contains filtered or unexported fields }
func NewRemoveCompareExchangeValueCommand ¶
func NewRemoveCompareExchangeValueCommand(clazz reflect.Type, key string, index int64, conventions *DocumentConventions) (*RemoveCompareExchangeValueCommand, error)
func (*RemoveCompareExchangeValueCommand) CreateRequest ¶
func (c *RemoveCompareExchangeValueCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*RemoveCompareExchangeValueCommand) SetResponse ¶
func (c *RemoveCompareExchangeValueCommand) SetResponse(response []byte, fromCache bool) error
type ReplicationNode ¶
type ReplicationNode struct { URL string `json:"Url"` Database string `json:"Database"` IsDisabled bool `json:"Disabled"` }
ReplicationNode describes replication node
type ReplicationWaitOptsBuilder ¶
type ReplicationWaitOptsBuilder struct {
// contains filtered or unexported fields
}
func (*ReplicationWaitOptsBuilder) Majority ¶
func (b *ReplicationWaitOptsBuilder) Majority(waitForMajority bool) *ReplicationWaitOptsBuilder
func (*ReplicationWaitOptsBuilder) NumberOfReplicas ¶
func (b *ReplicationWaitOptsBuilder) NumberOfReplicas(replicas int) *ReplicationWaitOptsBuilder
func (*ReplicationWaitOptsBuilder) ThrowOnTimeout ¶
func (b *ReplicationWaitOptsBuilder) ThrowOnTimeout(shouldThrow bool) *ReplicationWaitOptsBuilder
func (*ReplicationWaitOptsBuilder) WithTimeout ¶
func (b *ReplicationWaitOptsBuilder) WithTimeout(timeout time.Duration) *ReplicationWaitOptsBuilder
type RequestExecutor ¶
type RequestExecutor struct { Certificate *tls.Certificate TrustStore *x509.Certificate NumberOfServerRequests atomicInteger TopologyEtag int64 ClientConfigurationEtag int64 // TODO: mulit-threaded access, protect Cache *httpCache // contains filtered or unexported fields }
RequestExecutor describes executor of HTTP requests
func ClusterRequestExecutorCreate ¶
func ClusterRequestExecutorCreate(initialUrls []string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions) *RequestExecutor
func ClusterRequestExecutorCreateForSingleNode ¶
func ClusterRequestExecutorCreateForSingleNode(url string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions) *RequestExecutor
func NewClusterRequestExecutor ¶
func NewClusterRequestExecutor(certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions, initialUrls []string) *RequestExecutor
func NewRequestExecutor ¶
func NewRequestExecutor(databaseName string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions, initialUrls []string) *RequestExecutor
NewRequestExecutor creates a new executor
func RequestExecutorCreate ¶
func RequestExecutorCreate(initialUrls []string, databaseName string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions) *RequestExecutor
func RequestExecutorCreateForSingleNodeWithConfigurationUpdates ¶
func RequestExecutorCreateForSingleNodeWithConfigurationUpdates(url string, databaseName string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions) *RequestExecutor
func RequestExecutorCreateForSingleNodeWithoutConfigurationUpdates ¶
func RequestExecutorCreateForSingleNodeWithoutConfigurationUpdates(url string, databaseName string, certificate *tls.Certificate, trustStore *x509.Certificate, conventions *DocumentConventions) *RequestExecutor
func (*RequestExecutor) Close ¶
func (re *RequestExecutor) Close()
Close should be called when deleting executor
func (*RequestExecutor) Execute ¶
func (re *RequestExecutor) Execute(chosenNode *ServerNode, nodeIndex int, command RavenCommand, shouldRetry bool, sessionInfo *SessionInfo) error
Execute executes a command on a given node If nodeIndex is -1, we don't know the index
func (*RequestExecutor) ExecuteCommand ¶
func (re *RequestExecutor) ExecuteCommand(command RavenCommand, sessionInfo *SessionInfo) error
sessionInfo can be nil
func (*RequestExecutor) GetConventions ¶
func (re *RequestExecutor) GetConventions() *DocumentConventions
func (*RequestExecutor) GetHTTPClient ¶
func (re *RequestExecutor) GetHTTPClient() (*http.Client, error)
GetHTTPClient returns http client for sending the requests
func (*RequestExecutor) GetTopology ¶
func (re *RequestExecutor) GetTopology() *Topology
func (*RequestExecutor) GetTopologyNodes ¶
func (re *RequestExecutor) GetTopologyNodes() []*ServerNode
GetTopologyNodes returns a copy of topology nodes
func (*RequestExecutor) GetURL ¶
func (re *RequestExecutor) GetURL() (string, error)
GetURL returns an URL
func (*RequestExecutor) MakeCluster ¶
func (re *RequestExecutor) MakeCluster()
func (*RequestExecutor) UpdateTopologyAsync ¶
func (re *RequestExecutor) UpdateTopologyAsync(node *ServerNode, timeout int) chan *clusterUpdateAsyncResult
type ResetIndexCommand ¶
type ResetIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewResetIndexCommand ¶
func NewResetIndexCommand(indexName string) (*ResetIndexCommand, error)
func (*ResetIndexCommand) CreateRequest ¶
func (c *ResetIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type ResetIndexOperation ¶
type ResetIndexOperation struct { Command *ResetIndexCommand // contains filtered or unexported fields }
func NewResetIndexOperation ¶
func NewResetIndexOperation(indexName string) (*ResetIndexOperation, error)
func (*ResetIndexOperation) GetCommand ¶
func (o *ResetIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type ResponseTimeInformation ¶
type ResponseTimeInformation struct {
// contains filtered or unexported fields
}
ResponseTimeInformation describes timing information of server requests
type ResponseTimeItem ¶
ResponseTimeItem represents a duration for executing a given url
type RestoreCaching ¶
type RestoreCaching struct {
// contains filtered or unexported fields
}
func (*RestoreCaching) Close ¶
func (r *RestoreCaching) Close() error
type Revision ¶
type Revision struct { Previous interface{} Current interface{} }
Revision describes a revision
type RevisionsCollectionConfiguration ¶
type RevisionsCollectionConfiguration struct { // Note: in java MinimumRevisionsToKeep is Long, which is ref type // so by default it's not serialized to JSON if not set // in Go 0 is default so use "omitempty" to achieve the same effect MinimumRevisionsToKeep int64 `json:"MinimumRevisionsToKeep,omitempty"` MinimumRevisionAgeToKeep *Duration `json:"MinimumRevisionAgeToKeep"` Disabled bool `json:"Disabled"` PurgeOnDelete bool `json:"PurgeOnDelete"` }
RevisionsCollectionConfiguration describes configuration for revisions collection
type RevisionsConfiguration ¶
type RevisionsConfiguration struct { DefaultConfig *RevisionsCollectionConfiguration `json:"Default"` Collections map[string]*RevisionsCollectionConfiguration `json:"Collections"` }
RevisionsConfiguration describes revisions configuration
type RevisionsDisabledError ¶
type RevisionsDisabledError struct {
RavenError
}
func (*RevisionsDisabledError) Error ¶
func (e *RevisionsDisabledError) Error() string
Error makes it conform to error interface
func (*RevisionsDisabledError) WrappedError ¶
func (e *RevisionsDisabledError) WrappedError() error
hackish way to get a wrapped error
type RevisionsSessionOperations ¶
type RevisionsSessionOperations = DocumentSessionRevisions
TODO: write a unique wrapper type
type RouteNotFoundError ¶
type RouteNotFoundError struct {
RavenError
}
func (*RouteNotFoundError) Error ¶
func (e *RouteNotFoundError) Error() string
Error makes it conform to error interface
func (*RouteNotFoundError) WrappedError ¶
func (e *RouteNotFoundError) WrappedError() error
hackish way to get a wrapped error
type RuntimeError ¶
type RuntimeError struct {
// contains filtered or unexported fields
}
RuntimeError represents generic runtime error
func (*RuntimeError) Error ¶
func (e *RuntimeError) Error() string
Error makes it conform to error interface
func (*RuntimeError) WrappedError ¶
func (e *RuntimeError) WrappedError() error
hackish way to get a wrapped error
type ScriptResolver ¶
type ScriptResolver struct { Script string `json:"Script"` LastModifiedTime Time `json:"LastModifiedTime"` }
ScriptResolver describes script resolver
type SearchOperator ¶
type SearchOperator int
const ( SearchOperatorUnset SearchOperator = iota SearchOperatorOr SearchOperatorAnd )
type SecurityError ¶
type SecurityError struct {
RavenError
}
func (*SecurityError) Error ¶
func (e *SecurityError) Error() string
Error makes it conform to error interface
func (*SecurityError) WrappedError ¶
func (e *SecurityError) WrappedError() error
hackish way to get a wrapped error
type SeedIdentityForCommand ¶
type SeedIdentityForCommand struct { RavenCommandBase Result int // contains filtered or unexported fields }
func NewSeedIdentityForCommand ¶
func NewSeedIdentityForCommand(id string, value int64, forced bool) (*SeedIdentityForCommand, error)
func (*SeedIdentityForCommand) CreateRequest ¶
func (c *SeedIdentityForCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*SeedIdentityForCommand) SetResponse ¶
func (c *SeedIdentityForCommand) SetResponse(response []byte, fromCache bool) error
type Semaphore ¶
type Semaphore struct {
// contains filtered or unexported fields
}
Semaphore is a Go implementation of Java's Semaphore
func NewSemaphore ¶
type ServerLoadFailureError ¶
type ServerLoadFailureError struct {
RavenError
}
func (*ServerLoadFailureError) Error ¶
func (e *ServerLoadFailureError) Error() string
Error makes it conform to error interface
func (*ServerLoadFailureError) WrappedError ¶
func (e *ServerLoadFailureError) WrappedError() error
hackish way to get a wrapped error
type ServerNode ¶
type ServerNode struct { URL string `json:"Url"` Database string `json:"Database"` ClusterTag string `json:"ClusterTag"` ServerRole string `json:"ServerRole"` }
ServerNode describes a single server node
type ServerOperationExecutor ¶
type ServerOperationExecutor struct {
// contains filtered or unexported fields
}
func NewServerOperationExecutor ¶
func NewServerOperationExecutor(store *DocumentStore) *ServerOperationExecutor
func (*ServerOperationExecutor) Close ¶
func (e *ServerOperationExecutor) Close()
func (*ServerOperationExecutor) Send ¶
func (e *ServerOperationExecutor) Send(operation IServerOperation) error
func (*ServerOperationExecutor) SendAsync ¶
func (e *ServerOperationExecutor) SendAsync(operation IServerOperation) (*Operation, error)
type SessionCreatedEventArgs ¶
type SessionCreatedEventArgs struct {
Session *InMemoryDocumentSessionOperations
}
SessionCreatedEventArgs represents session created event args
type SessionInfo ¶
type SessionInfo struct { SessionID int // contains filtered or unexported fields }
SessionInfo describes a session
type SessionOptions ¶
type SessionOptions struct { Database string RequestExecutor *RequestExecutor TransactionMode int DisableAtomicDocumentWritesInClusterWideTransaction *bool }
SessionOptions describes session options
type SetIndexesLockCommand ¶
type SetIndexesLockCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewSetIndexesLockCommand ¶
func NewSetIndexesLockCommand(conventions *DocumentConventions, parameters *SetIndexesLockParameters) (*SetIndexesLockCommand, error)
func (*SetIndexesLockCommand) CreateRequest ¶
func (c *SetIndexesLockCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type SetIndexesLockOperation ¶
type SetIndexesLockOperation struct { Command *SetIndexesLockCommand // contains filtered or unexported fields }
func NewSetIndexesLockOperation ¶
func NewSetIndexesLockOperation(indexName string, mode IndexLockMode) (*SetIndexesLockOperation, error)
func NewSetIndexesLockOperationWithParameters ¶
func NewSetIndexesLockOperationWithParameters(parameters *SetIndexesLockParameters) (*SetIndexesLockOperation, error)
func (*SetIndexesLockOperation) GetCommand ¶
func (o *SetIndexesLockOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type SetIndexesLockParameters ¶
type SetIndexesLockParameters struct { IndexNames []string `json:"IndexNames"` Mode IndexLockMode `json:"Mode"` }
Note: in Java it's Parameters class nested in SetIndexesLockOperation Parameters is already taken
type SetIndexesPriorityCommand ¶
type SetIndexesPriorityCommand struct { RavenCommandBase // contains filtered or unexported fields }
SetIndexesPriorityCommand represents command to set indexes priority
func NewSetIndexesPriorityCommand ¶
func NewSetIndexesPriorityCommand(conventions *DocumentConventions, parameters *SetIndexesPriorityParameters) (*SetIndexesPriorityCommand, error)
NewSetIndexesPriorityCommand returns new SetIndexesPriorityCommand
func (*SetIndexesPriorityCommand) CreateRequest ¶
func (c *SetIndexesPriorityCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type SetIndexesPriorityOperation ¶
type SetIndexesPriorityOperation struct { Command *SetIndexesPriorityCommand // contains filtered or unexported fields }
SetIndexesPriorityOperation represents operation for setting indexes priority
func NewSetIndexesPriorityOperation ¶
func NewSetIndexesPriorityOperation(indexName string, priority IndexPriority) (*SetIndexesPriorityOperation, error)
NewSetIndexesPriorityOperation returns new SetIndexesPriorityParameters
func (*SetIndexesPriorityOperation) GetCommand ¶
func (o *SetIndexesPriorityOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
GetCommand returns a command
type SetIndexesPriorityParameters ¶
type SetIndexesPriorityParameters struct { IndexNames []string `json:"IndexNames"` Priority IndexPriority `json:"Priority"` }
SetIndexesPriorityParameters represents arrgument for SetIndexPriorityCommand Note: in Java it's Parameters class nested in SetIndexesPriorityOperation "Parameters" name is already taken
type SpatialBounds ¶
SpatialBounds describes bounds of a region
func NewSpatialBounds ¶
func NewSpatialBounds(minX float64, minY float64, maxX float64, maxY float64) *SpatialBounds
NewSpatialBounds returns new SpatialBounds
type SpatialCriteria ¶
type SpatialCriteriaCommon ¶
type SpatialCriteriaCommon struct {
// contains filtered or unexported fields
}
func NewSpatialCriteria ¶
func NewSpatialCriteria(relation SpatialRelation, distanceErrorPct float64) SpatialCriteriaCommon
type SpatialCriteriaFactory ¶
type SpatialCriteriaFactory struct { }
func NewSpatialCriteriaFactory ¶
func NewSpatialCriteriaFactory() *SpatialCriteriaFactory
func (*SpatialCriteriaFactory) Contains ¶
func (f *SpatialCriteriaFactory) Contains(shapeWkt string) *WktCriteria
func (*SpatialCriteriaFactory) ContainsWithError ¶
func (f *SpatialCriteriaFactory) ContainsWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
func (*SpatialCriteriaFactory) Disjoint ¶
func (f *SpatialCriteriaFactory) Disjoint(shapeWkt string) *WktCriteria
func (*SpatialCriteriaFactory) DisjointWithError ¶
func (f *SpatialCriteriaFactory) DisjointWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
func (*SpatialCriteriaFactory) Intersects ¶
func (f *SpatialCriteriaFactory) Intersects(shapeWkt string) *WktCriteria
func (*SpatialCriteriaFactory) IntersectsWithError ¶
func (f *SpatialCriteriaFactory) IntersectsWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
func (*SpatialCriteriaFactory) RelatesToShape ¶
func (f *SpatialCriteriaFactory) RelatesToShape(shapeWkt string, relation SpatialRelation) *WktCriteria
func (*SpatialCriteriaFactory) RelatesToShapeWithError ¶
func (f *SpatialCriteriaFactory) RelatesToShapeWithError(shapeWkt string, relation SpatialRelation, distErrorPercent float64) *WktCriteria
func (*SpatialCriteriaFactory) Within ¶
func (f *SpatialCriteriaFactory) Within(shapeWkt string) *WktCriteria
func (*SpatialCriteriaFactory) WithinRadius ¶
func (f *SpatialCriteriaFactory) WithinRadius(radius float64, latitude float64, longitude float64) *CircleCriteria
func (*SpatialCriteriaFactory) WithinRadiusWithUnits ¶
func (f *SpatialCriteriaFactory) WithinRadiusWithUnits(radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits) *CircleCriteria
func (*SpatialCriteriaFactory) WithinRadiusWithUnitsAndError ¶
func (f *SpatialCriteriaFactory) WithinRadiusWithUnitsAndError(radius float64, latitude float64, longitude float64, radiusUnits SpatialUnits, distErrorPercent float64) *CircleCriteria
func (*SpatialCriteriaFactory) WithinWithError ¶
func (f *SpatialCriteriaFactory) WithinWithError(shapeWkt string, distErrorPercent float64) *WktCriteria
type SpatialOptions ¶
type SpatialOptions struct { Type SpatialFieldType `json:"Type"` Strategy SpatialSearchStrategy `json:"Strategy"` MaxTreeLevel int `json:"MaxTreeLevel"` MinX float64 `json:"MinX"` MaxX float64 `json:"MaxX"` MinY float64 `json:"MinY"` MaxY float64 `json:"MaxY"` // Circle radius units, only used for geography indexes Units SpatialUnits `json:"Units"` }
/ SpatialOptions describes spatial options
func NewCartesianBoundingBoxIndex ¶
func NewCartesianBoundingBoxIndex() *SpatialOptions
NewCartesianBoundingBoxIndex returns cartesian SpatialOptions
func NewCartesianQuadPrefixTreeIndex ¶
func NewCartesianQuadPrefixTreeIndex(maxTreeLevel int, bounds *SpatialBounds) *SpatialOptions
NewCartesianQuadPrefixTreeIndex returns cartesian SpatialOptions for quad prefix tree index
func NewGeographyBoundingBoxIndexWithRadius ¶
func NewGeographyBoundingBoxIndexWithRadius(circleRadiusUnits SpatialUnits) *SpatialOptions
NewGeographyBoundingBoxIndexWithRadius return geography SpatialOptions for a bounding box with a given radius
func NewGeographyDefaultOptions ¶
func NewGeographyDefaultOptions() *SpatialOptions
NewGeographyDefaultOptions returns default geography SpatialOptions
func NewGeographyDefaultOptionsWithRadius ¶
func NewGeographyDefaultOptionsWithRadius(circleRadiusUnits SpatialUnits) *SpatialOptions
NewGeographyDefaultOptionsWithRadius returns default geography SpatialOptions with a a given radius
func NewGeographyGeohashPrefixTreeIndex ¶
func NewGeographyGeohashPrefixTreeIndex(maxTreeLevel int) *SpatialOptions
NewGeographyGeohashPrefixTreeIndex returns geography SpatialOptions for using geography geohash prefix tree index
func NewGeographyGeohashPrefixTreeIndexWithRadius ¶
func NewGeographyGeohashPrefixTreeIndexWithRadius(maxTreeLevel int, circleRadiusUnits SpatialUnits) *SpatialOptions
NewGeographyGeohashPrefixTreeIndexWithRadius returns geography SpatialOptions for // using geography geohash prefix tree index with a given circle radius
func NewGeographyQuadPrefixTreeIndex ¶
func NewGeographyQuadPrefixTreeIndex(maxTreeLevel int) *SpatialOptions
NewGeographyQuadPrefixTreeIndex returns geography SpatialOptions for quad prefix tree
func NewGeographyQuadPrefixTreeIndexWithRadius ¶
func NewGeographyQuadPrefixTreeIndexWithRadius(maxTreeLevel int, circleRadiusUnits SpatialUnits) *SpatialOptions
NewGeographyQuadPrefixTreeIndex returns geography SpatialOptions for quad prefix tree with a given radius
func NewGeograpyboundingBoxIndex ¶
func NewGeograpyboundingBoxIndex() *SpatialOptions
NewGeograpyboundingBoxIndex returns geography SpatialOptions for a bounding box
func NewSpatialOptions ¶
func NewSpatialOptions() *SpatialOptions
NewSpatialOptions returns new SpatialOptions with default values
type SpatialRelation ¶
type SpatialRelation = string
type SpatialSearchStrategy ¶
type SpatialSearchStrategy = string
SpatialSearchStrategy represents spatial search strategy
type SpatialUnits ¶
type SpatialUnits = string
SpatialUnits describes units used for spatial queries
type StartIndexCommand ¶
type StartIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewStartIndexCommand ¶
func NewStartIndexCommand(indexName string) (*StartIndexCommand, error)
func (*StartIndexCommand) CreateRequest ¶
func (c *StartIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type StartIndexOperation ¶
type StartIndexOperation struct { Command *StartIndexCommand // contains filtered or unexported fields }
func NewStartIndexOperation ¶
func NewStartIndexOperation(indexName string) (*StartIndexOperation, error)
func (*StartIndexOperation) GetCommand ¶
func (o *StartIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type StartIndexingCommand ¶
type StartIndexingCommand struct {
RavenCommandBase
}
func NewStartIndexingCommand ¶
func NewStartIndexingCommand() *StartIndexingCommand
func (*StartIndexingCommand) CreateRequest ¶
func (c *StartIndexingCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type StartIndexingOperation ¶
type StartIndexingOperation struct {
Command *StartIndexingCommand
}
func NewStartIndexingOperation ¶
func NewStartIndexingOperation() *StartIndexingOperation
func (*StartIndexingOperation) GetCommand ¶
func (o *StartIndexingOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type StartsWithArgs ¶
type StartsWithArgs struct { StartsWith string // TODO: Prefix? Matches string Start int PageSize int StartAfter string Exclude string }
StartsWithArgs contains arguments for functions that return documents matching one or more options. StartsWith is required, other fields are optional.
type StopIndexCommand ¶
type StopIndexCommand struct { RavenCommandBase // contains filtered or unexported fields }
func NewStopIndexCommand ¶
func NewStopIndexCommand(indexName string) (*StopIndexCommand, error)
func (*StopIndexCommand) CreateRequest ¶
func (c *StopIndexCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type StopIndexOperation ¶
type StopIndexOperation struct { Command *StopIndexCommand // contains filtered or unexported fields }
func NewStopIndexOperation ¶
func NewStopIndexOperation(indexName string) (*StopIndexOperation, error)
func (*StopIndexOperation) GetCommand ¶
func (o *StopIndexOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type StopIndexingCommand ¶
type StopIndexingCommand struct {
RavenCommandBase
}
func NewStopIndexingCommand ¶
func NewStopIndexingCommand() *StopIndexingCommand
func (*StopIndexingCommand) CreateRequest ¶
func (c *StopIndexingCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type StopIndexingOperation ¶
type StopIndexingOperation struct {
Command *StopIndexingCommand
}
func NewStopIndexingOperation ¶
func NewStopIndexingOperation() *StopIndexingOperation
func (*StopIndexingOperation) GetCommand ¶
func (o *StopIndexingOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type StreamCommand ¶
type StreamCommand struct { RavenCommandBase Result *StreamResultResponse // contains filtered or unexported fields }
func NewStreamCommand ¶
func NewStreamCommand(url string) *StreamCommand
func (*StreamCommand) CreateRequest ¶
func (c *StreamCommand) CreateRequest(node *ServerNode) (*http.Request, error)
type StreamIterator ¶
type StreamIterator struct {
// contains filtered or unexported fields
}
StreamIterator represents iterator of stream query
func (*StreamIterator) Next ¶
func (i *StreamIterator) Next(v interface{}) (*StreamResult, error)
Next returns next result in a streaming query.
type StreamOperation ¶
type StreamOperation struct {
// contains filtered or unexported fields
}
StreamOperation represents a streaming operation
func NewStreamOperation ¶
func NewStreamOperation(session *InMemoryDocumentSessionOperations, statistics *StreamQueryStatistics) *StreamOperation
NewStreamOperation returns new StreamOperation
type StreamQueryStatistics ¶
type StreamResult ¶
type StreamResult struct { ID string ChangeVector *string Metadata *MetadataAsDictionary Document interface{} }
StreamResult represents result of stream iterator
type StreamResultResponse ¶
type StringDistanceTypes ¶
type StringDistanceTypes = string
type SubscriberErrorError ¶
type SubscriberErrorError struct {
SubscriptionError
}
SubscriberErrorError represents error about subscriber error Note: name is unfortunate but it corresponds to Java's SubscriberErrorException
func (*SubscriberErrorError) Error ¶
func (e *SubscriberErrorError) Error() string
Error makes it conform to error interface
func (*SubscriberErrorError) WrappedError ¶
func (e *SubscriberErrorError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionBatch ¶
type SubscriptionBatch struct { Items []*SubscriptionBatchItem // contains filtered or unexported fields }
SubscriptionBatch describes a bunch of results for subscription
func (*SubscriptionBatch) OpenSession ¶
func (b *SubscriptionBatch) OpenSession() (*DocumentSession, error)
type SubscriptionBatchItem ¶
type SubscriptionBatchItem struct { Result interface{} ErrorMessage string ID string ChangeVector string RawResult map[string]interface{} RawMetadata map[string]interface{} Metadata *MetadataAsDictionary }
SubscriptionBatchItem describes a single result from subscription
func (*SubscriptionBatchItem) GetMetadata ¶
func (i *SubscriptionBatchItem) GetMetadata() *MetadataAsDictionary
func (*SubscriptionBatchItem) GetResult ¶
func (i *SubscriptionBatchItem) GetResult(result interface{}) error
GetResult sets result to to the value of that batch item
type SubscriptionChangeVectorUpdateConcurrencyError ¶
type SubscriptionChangeVectorUpdateConcurrencyError struct {
SubscriptionError
}
SubscriptionChangeVectorUpdateConcurrencyError represents an error about subscription change vector update concurrency
func (*SubscriptionChangeVectorUpdateConcurrencyError) Error ¶
func (e *SubscriptionChangeVectorUpdateConcurrencyError) Error() string
Error makes it conform to error interface
func (*SubscriptionChangeVectorUpdateConcurrencyError) WrappedError ¶
func (e *SubscriptionChangeVectorUpdateConcurrencyError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionClientMessageType ¶
type SubscriptionClientMessageType = string
SubscriptionClientMessageType describes type of subscription client message
type SubscriptionClosedError ¶
type SubscriptionClosedError struct {
SubscriptionError
}
SubscriptionClosedError is returned when subscription is closed
func (*SubscriptionClosedError) Error ¶
func (e *SubscriptionClosedError) Error() string
Error makes it conform to error interface
func (*SubscriptionClosedError) WrappedError ¶
func (e *SubscriptionClosedError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionConnectionClientMessage ¶
type SubscriptionConnectionClientMessage struct { Type SubscriptionClientMessageType `json:"Type"` ChangeVector *string `json:"ChangeVector"` }
SubscriptionConnectionClientMessage describes a subscription connection message
type SubscriptionCreationOptions ¶
type SubscriptionCreationOptions struct { // must omitempty Name or else the server will try to find a subscription // with empty name Name string `json:"Name,omitempty"` Query string `json:"Query"` ChangeVector *string `json:"ChangeVector"` MentorNode string `json:"MentorNode,omitempty"` }
SubscriptionCreationOptions describes options for creating a subscription
type SubscriptionDoesNotBelongToNodeError ¶
type SubscriptionDoesNotBelongToNodeError struct { SubscriptionError // contains filtered or unexported fields }
SubscriptionDoesNotBelongToNodeError is returned when subscription does not belong to node
func (*SubscriptionDoesNotBelongToNodeError) Error ¶
func (e *SubscriptionDoesNotBelongToNodeError) Error() string
Error makes it conform to error interface
func (*SubscriptionDoesNotBelongToNodeError) WrappedError ¶
func (e *SubscriptionDoesNotBelongToNodeError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionDoesNotExistError ¶
type SubscriptionDoesNotExistError struct {
SubscriptionError
}
SubscriptionDoesNotExistError is returned when subscription doesn't exist
func (*SubscriptionDoesNotExistError) Error ¶
func (e *SubscriptionDoesNotExistError) Error() string
Error makes it conform to error interface
func (*SubscriptionDoesNotExistError) WrappedError ¶
func (e *SubscriptionDoesNotExistError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionError ¶
type SubscriptionError struct {
RavenError
}
a base type for subscription-related errors
func (*SubscriptionError) Error ¶
func (e *SubscriptionError) Error() string
Error makes it conform to error interface
func (*SubscriptionError) WrappedError ¶
func (e *SubscriptionError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionInUseError ¶
type SubscriptionInUseError struct {
SubscriptionError
}
SubscriptionInUseError is returned when subscription is in use
func (*SubscriptionInUseError) Error ¶
func (e *SubscriptionInUseError) Error() string
Error makes it conform to error interface
func (*SubscriptionInUseError) WrappedError ¶
func (e *SubscriptionInUseError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionInvalidStateError ¶
type SubscriptionInvalidStateError struct {
SubscriptionError
}
SubscriptionInvalidStateError is returned when subscription is in invalid state
func (*SubscriptionInvalidStateError) Error ¶
func (e *SubscriptionInvalidStateError) Error() string
Error makes it conform to error interface
func (*SubscriptionInvalidStateError) WrappedError ¶
func (e *SubscriptionInvalidStateError) WrappedError() error
hackish way to get a wrapped error
type SubscriptionOpeningStrategy ¶
type SubscriptionOpeningStrategy = string
SubscriptionOpeningStrategy describes opening strategy for subscriptions
type SubscriptionState ¶
type SubscriptionState struct { Query string `json:"Query"` ChangeVectorForNextBatchStartingPoint *string `json:"ChangeVectorForNextBatchStartingPoint"` SubscriptionID int64 `json:"SubscriptionId"` SubscriptionName string `json:"SubscriptionName"` MentorNode string `json:"MentorNode"` NodeTag string `json:"NodeTag"` LastBatchAckTime Time `json:"LastBatchAckTime"` LastClientConnectionTime Time `json:"LastClientConnectionTime"` Disabled bool `json:"Disabled"` }
SubscriptionState describes state of subscription
type SubscriptionStateWithNodeDetails ¶
type SubscriptionStateWithNodeDetails struct { SubscriptionState ResponsibleNode NodeID }
SubscriptionStateWithNodeDetails describes subscription state with node details
type SubscriptionTryout ¶
type SubscriptionTryout struct {
// contains filtered or unexported fields
}
SubscriptionTryout describes subscription tryout
type SubscriptionWorker ¶
type SubscriptionWorker struct {
// contains filtered or unexported fields
}
SubscriptionWorker describes subscription worker
func NewSubscriptionWorker ¶
func NewSubscriptionWorker(clazz reflect.Type, options *SubscriptionWorkerOptions, withRevisions bool, documentStore *DocumentStore, dbName string) (*SubscriptionWorker, error)
NewSubscriptionWorker returns new SubscriptionWorker
func (*SubscriptionWorker) AddAfterAcknowledgmentListener ¶
func (w *SubscriptionWorker) AddAfterAcknowledgmentListener(handler func(*SubscriptionBatch)) int
AddAfterAcknowledgmentListener adds callback function that will be called after listener has been acknowledged. Returns id that can be used in RemoveAfterAcknowledgmentListener
func (*SubscriptionWorker) AddOnSubscriptionConnectionRetry ¶
func (w *SubscriptionWorker) AddOnSubscriptionConnectionRetry(handler func(error)) int
AddOnSubscriptionConnectionRetry adds a callback function that will be called when subscription connection is retried. Returns id that can be used in RemoveOnSubscriptionConnectionRetry
func (*SubscriptionWorker) Cancel ¶
func (w *SubscriptionWorker) Cancel()
Cancel requests the worker to finish. It doesn't happen immediately. To check if the worker finished, use HasFinished To wait
func (*SubscriptionWorker) Close ¶
func (w *SubscriptionWorker) Close() error
Close closes a subscription
func (*SubscriptionWorker) Err ¶
func (w *SubscriptionWorker) Err() error
Err returns a potential error, available after worker finished
func (*SubscriptionWorker) IsDone ¶
func (w *SubscriptionWorker) IsDone() bool
IsDone returns true if the worker has finished
func (*SubscriptionWorker) RemoveAfterAcknowledgmentListener ¶
func (w *SubscriptionWorker) RemoveAfterAcknowledgmentListener(id int)
RemoveAfterAcknowledgmentListener removes a callback added with AddAfterAcknowledgmentListener
func (*SubscriptionWorker) RemoveOnSubscriptionConnectionRetry ¶
func (w *SubscriptionWorker) RemoveOnSubscriptionConnectionRetry(id int)
RemoveOnSubscriptionConnectionRetry removes a callback added with AddOnSubscriptionConnectionRetry
func (*SubscriptionWorker) Run ¶
func (w *SubscriptionWorker) Run(cb func(*SubscriptionBatch) error) error
func (*SubscriptionWorker) WaitUntilFinished ¶
func (w *SubscriptionWorker) WaitUntilFinished(timeout time.Duration) error
WaitUntilFinished waits until worker finishes for up to a timeout and returns an error. If timeout is 0, it waits indefinitely.
type SubscriptionWorkerOptions ¶
type SubscriptionWorkerOptions struct { SubscriptionName string `json:"SubscriptionName"` TimeToWaitBeforeConnectionRetry Duration `json:"TimeToWaitBeforeConnectionRetry"` IgnoreSubscriberErrors bool `json:"IgnoreSubscriberErrors"` Strategy SubscriptionOpeningStrategy `json:"Strategy"` MaxDocsPerBatch int `json:"MaxDocsPerBatch"` MaxErroneousPeriod Duration `json:"MaxErroneousPeriod"` CloseWhenNoDocsLeft bool `json:"CloseWhenNoDocsLeft"` }
SubscriptionWorkerOptions describes options for subscription worker
func NewSubscriptionWorkerOptions ¶
func NewSubscriptionWorkerOptions(subscriptionName string) *SubscriptionWorkerOptions
NewSubscriptionWorkerOptions returns new SubscriptionWorkerOptions
type SuggestionBase ¶
type SuggestionBase interface {
SetOptions(*SuggestionOptions)
}
for documentation purposes only TODO: could be simplified. We really only need SuggestionWithTerms, which is a superset of SuggestionWithTerm
type SuggestionBuilder ¶
type SuggestionBuilder struct {
// contains filtered or unexported fields
}
SuggestionsBuilder helps to build argument to SuggestUsing
func NewSuggestionBuilder ¶
func NewSuggestionBuilder() *SuggestionBuilder
func (*SuggestionBuilder) ByField ¶
func (b *SuggestionBuilder) ByField(fieldName string, term string, terms ...string) *SuggestionBuilder
func (*SuggestionBuilder) GetSuggestion ¶
func (b *SuggestionBuilder) GetSuggestion() SuggestionBase
func (*SuggestionBuilder) WithOptions ¶
func (b *SuggestionBuilder) WithOptions(options *SuggestionOptions) *SuggestionBuilder
type SuggestionCommon ¶
type SuggestionCommon struct { Field string Options *SuggestionOptions }
func (*SuggestionCommon) SetOptions ¶
func (s *SuggestionCommon) SetOptions(options *SuggestionOptions)
type SuggestionDocumentQuery ¶
type SuggestionDocumentQuery struct {
// contains filtered or unexported fields
}
SuggestionDocumentQuery represents "suggestion" query
func (*SuggestionDocumentQuery) Execute ¶
func (q *SuggestionDocumentQuery) Execute() (map[string]*SuggestionResult, error)
func (*SuggestionDocumentQuery) ExecuteLazy ¶
func (q *SuggestionDocumentQuery) ExecuteLazy() (*Lazy, error)
onEval: v is map[string]*SuggestionResult
func (*SuggestionDocumentQuery) InvokeAfterQueryExecuted ¶
func (q *SuggestionDocumentQuery) InvokeAfterQueryExecuted(result *QueryResult)
type SuggestionOptions ¶
type SuggestionOptions struct { PageSize int Distance StringDistanceTypes Accuracy float32 SortMode SuggestionSortMode }
func NewSuggestionOptions ¶
func NewSuggestionOptions() *SuggestionOptions
type SuggestionResult ¶
type SuggestionSortMode ¶
type SuggestionSortMode = string
type SuggestionWithTerm ¶
type SuggestionWithTerm struct { SuggestionCommon Term string }
func NewSuggestionWithTerm ¶
func NewSuggestionWithTerm(field string) *SuggestionWithTerm
type SuggestionWithTerms ¶
type SuggestionWithTerms struct { SuggestionCommon Terms []string }
func NewSuggestionWithTerms ¶
func NewSuggestionWithTerms(field string) *SuggestionWithTerms
type TcpConnectionInfo ¶
type TcpConnectionInfo struct { Port int `json:"Port"` URL string `json:"Url"` Certificate *string `json:"Certificate"` }
TcpConnectionInfo describes tpc connection
type TermsQueryResult ¶
type TermsQueryResult struct { Terms []string `json:"Terms"` ResultEtag int64 `json:"ResultEtag"` IndexName string `json:"IndexName"` }
TermsQueryResult represents results of terms query
type Time ¶
Time is an alias for time.Time that serializes/deserializes in ways compatible with Ravendb server
func (Time) Format ¶
Format formats time in a way that RavenDB server understands. RavenDB is strict enough that a single format can't produce valid string values.
func (Time) MarshalJSON ¶
func (*Time) UnmarshalJSON ¶
type TimeoutError ¶
type TimeoutError struct {
RavenError
}
TimeoutError represents timeout error
func NewTimeoutError ¶
func NewTimeoutError(format string, args ...interface{}) *TimeoutError
NewTimeoutError returns new TimeoutError
func (*TimeoutError) Error ¶
func (e *TimeoutError) Error() string
Error makes it conform to error interface
func (*TimeoutError) WrappedError ¶
func (e *TimeoutError) WrappedError() error
hackish way to get a wrapped error
type Topology ¶
type Topology struct { Nodes []*ServerNode `json:"Nodes"` Etag int64 `json:"Etag"` }
Topology describes server nodes
type TransactionMode ¶
type TransactionMode = int
type UUID ¶
type UUID struct {
// contains filtered or unexported fields
}
UUID represents a random 16-byte number
type UnsuccessfulRequestError ¶
type UnsuccessfulRequestError struct {
RavenError
}
func (*UnsuccessfulRequestError) Error ¶
func (e *UnsuccessfulRequestError) Error() string
Error makes it conform to error interface
func (*UnsuccessfulRequestError) WrappedError ¶
func (e *UnsuccessfulRequestError) WrappedError() error
hackish way to get a wrapped error
type UnsupportedOperationError ¶
type UnsupportedOperationError struct {
// contains filtered or unexported fields
}
UnsupportedOperationError represents unsupported operation error
func (*UnsupportedOperationError) Error ¶
func (e *UnsupportedOperationError) Error() string
Error makes it conform to error interface
func (*UnsupportedOperationError) WrappedError ¶
func (e *UnsupportedOperationError) WrappedError() error
hackish way to get a wrapped error
type UpdateExternalReplicationCommand ¶
type UpdateExternalReplicationCommand struct { RavenCommandBase Result *ModifyOngoingTaskResult // contains filtered or unexported fields }
func NewUpdateExternalReplicationCommand ¶
func NewUpdateExternalReplicationCommand(newWatcher *ExternalReplication) *UpdateExternalReplicationCommand
func (*UpdateExternalReplicationCommand) CreateRequest ¶
func (c *UpdateExternalReplicationCommand) CreateRequest(node *ServerNode) (*http.Request, error)
func (*UpdateExternalReplicationCommand) SetResponse ¶
func (c *UpdateExternalReplicationCommand) SetResponse(response []byte, fromCache bool) error
type UpdateExternalReplicationOperation ¶
type UpdateExternalReplicationOperation struct { Command *UpdateExternalReplicationCommand // contains filtered or unexported fields }
func NewUpdateExternalReplicationOperation ¶
func NewUpdateExternalReplicationOperation(newWatcher *ExternalReplication) *UpdateExternalReplicationOperation
func (*UpdateExternalReplicationOperation) GetCommand ¶
func (o *UpdateExternalReplicationOperation) GetCommand(conventions *DocumentConventions) (RavenCommand, error)
type WktCriteria ¶
type WktCriteria struct { SpatialCriteriaCommon // contains filtered or unexported fields }
func NewWktCriteria ¶
func NewWktCriteria(shapeWkt string, relation SpatialRelation, distErrorPercent float64) *WktCriteria
func (*WktCriteria) GetShapeToken ¶
func (c *WktCriteria) GetShapeToken(addQueryParameter func(interface{}) string) *shapeToken
func (*WktCriteria) ToQueryToken ¶
func (c *WktCriteria) ToQueryToken(fieldName string, addQueryParameter func(interface{}) string) queryToken
Source Files ¶
- abstract_document_query.go
- abstract_index_creation_task.go
- advanced_session_extention_base.go
- advanced_session_operations.go
- after_save_changes_event_args.go
- aggregation_document_query.go
- aggregation_query_base.go
- aggresive_cache_options.go
- atomic_integer.go
- attachment_details.go
- attachment_name.go
- attachment_result.go
- attachment_type.go
- batch_command.go
- batch_operation.go
- batch_options.go
- before_delete_event_args.go
- before_query_event_args.go
- before_store_event_args.go
- bulk_insert_aborted_exception.go
- bulk_insert_operation.go
- character.go
- circle_criteria.go
- class_utils.go
- clean_closeable.go
- client_configuration.go
- close_subclause_token.go
- cluster_topology.go
- cmp_x_chg.go
- collection_statistics.go
- command_type.go
- compact_database_operation.go
- compact_settings.go
- compare_exchange_result.go
- compare_exchange_session_value.go
- compare_exchange_value.go
- compare_exchange_value_result_parser.go
- completable_future.go
- configure_revisions_operation.go
- conflict_solver.go
- connection_string.go
- connection_string_type.go
- constants.go
- copier.go
- create_database_operation.go
- create_sample_data_operation.go
- create_subscription_command.go
- create_subscription_result.go
- current_index_and_node.go
- database_changes.go
- database_promotion_status.go
- database_put_result.go
- database_record.go
- database_record_with_etag.go
- database_statistics.go
- database_topology.go
- declare_token.go
- delete_attachment_command_data.go
- delete_attachment_operation.go
- delete_by_query_operation.go
- delete_command_data.go
- delete_compare_exchange_value_operation.go
- delete_database_operation.go
- delete_database_result.go
- delete_document_command.go
- delete_index_operation.go
- delete_subscription_command.go
- disable_index_operation.go
- distinct_token.go
- doc.go
- document_change.go
- document_change_types.go
- document_conflict_exception.go
- document_conventions.go
- document_info.go
- document_query.go
- document_query_customization.go
- document_query_helper.go
- document_session.go
- document_session_attachments.go
- document_session_attachments_base.go
- document_session_cluster_transaction.go
- document_session_revisions.go
- document_store.go
- document_subscriptions.go
- documents_by_id.go
- documents_changes.go
- drop_subscription_connection_command.go
- duration.go
- dynamic_spatial_field.go
- enable_index_operation.go
- entity_to_json.go
- errors.go
- event_handler.go
- evict_items_from_cache_based_on_changes.go
- exception_dispatcher.go
- exceptions_utils.go
- explain_query_command.go
- external_replication.go
- facet.go
- facet_aggregation.go
- facet_base.go
- facet_builder.go
- facet_options.go
- facet_result.go
- facet_setup.go
- facet_term_sort_mode.go
- facet_token.go
- facet_value.go
- field_indexing.go
- field_storage.go
- field_term_vector.go
- fields_to_fetch_token.go
- from_token.go
- generate_entity_id_on_the_client.go
- generate_id.go
- generic_query_result.go
- generic_range_facet.go
- get_attachment_operation.go
- get_client_configuration_operation.go
- get_collection_statistics_operation.go
- get_compare_exchange_value_operation.go
- get_compare_exchange_values_operation.go
- get_conflicts_command.go
- get_conflicts_result.go
- get_database_names_operation.go
- get_database_record_operation.go
- get_database_topology_command.go
- get_documents_command.go
- get_documents_result.go
- get_identities_operation.go
- get_index_errors_operation.go
- get_index_names_operation.go
- get_index_operation.go
- get_index_statistics_operation.go
- get_indexes_operation.go
- get_indexes_statistics_operation.go
- get_indexing_status_operation.go
- get_next_operation_id_command.go
- get_operation_state_operation.go
- get_request.go
- get_response.go
- get_revision_operation.go
- get_revisions_bin_entry_command.go
- get_revisions_command.go
- get_server_wide_operation_state_operation.go
- get_statistics_operation.go
- get_subscription_state_command.go
- get_subscriptions_command.go
- get_subscriptions_result.go
- get_tcp_info_command.go
- get_terms_operation.go
- group_by.go
- group_by_count_token.go
- group_by_document_query.go
- group_by_field.go
- group_by_key_token.go
- group_by_method.go
- group_by_sum_token.go
- group_by_token.go
- hash_calculator.go
- head_attachment_command.go
- head_document_command.go
- hi_lo_id_generator.go
- hi_lo_result.go
- hi_lo_return_command.go
- http.go
- http_cache.go
- http_cache_item.go
- http_extensions.go
- i_command_data.go
- i_lazy_operation.go
- i_maintenance_operation.go
- i_more_like_this_builder_base.go
- i_more_like_this_builder_for_document_query.go
- i_more_like_this_operations.go
- i_operation.go
- i_server_operation.go
- id_type_and_name.go
- in_memory_document_session_operations.go
- includes_util.go
- index_change.go
- index_change_types.go
- index_configuration.go
- index_creation.go
- index_definition.go
- index_definition_builder.go
- index_errors.go
- index_field_options.go
- index_has_changed_operation.go
- index_information.go
- index_lock_mode.go
- index_priority.go
- index_query.go
- index_query_base.go
- index_query_content.go
- index_query_with_parameters.go
- index_running_status.go
- index_state.go
- index_stats.go
- index_type.go
- indexing_error.go
- indexing_status.go
- inflect.go
- intersect_marker_token.go
- java_script_array.go
- json_array_result.go
- json_extensions.go
- json_operation.go
- json_util.go
- kill_operation_command.go
- lazy.go
- lazy_aggregation_query_operation.go
- lazy_load_operation.go
- lazy_multi_loader_with_include.go
- lazy_query_operation.go
- lazy_session_operations.go
- lazy_starts_with_operation.go
- lazy_suggestion_query_operation.go
- leader_stamp.go
- load_operation.go
- load_starting_with_operation.go
- load_token.go
- maintenance_operation_executor.go
- map_util.go
- metadata_as_dictionary.go
- method_call.go
- modify_ongoing_task_result.go
- more_like_this_base.go
- more_like_this_builder.go
- more_like_this_options.go
- more_like_this_query_result.go
- more_like_this_scope.go
- more_like_this_stop_words.go
- more_like_this_token.go
- more_like_this_using_any_document.go
- more_like_this_using_document.go
- more_like_this_using_document_for_document_query.go
- multi_database_hi_lo_id_generator.go
- multi_get_command.go
- multi_get_operation.go
- multi_loader_with_include.go
- multi_type_hi_lo_id_generator.go
- negate_token.go
- next_hi_lo_command.go
- next_identity_for_command.go
- node_id.go
- node_selector.go
- object_set.go
- open_subclause_token.go
- operation.go
- operation_exception_result.go
- operation_executor.go
- operation_id_result.go
- operation_status_change.go
- order_by_token.go
- ordering_type.go
- parameters.go
- patch_by_query_operation.go
- patch_command_data.go
- patch_operation.go
- patch_request.go
- patch_result.go
- patch_status.go
- point_field.go
- put_attachment_command_data.go
- put_attachment_operation.go
- put_client_configuration_operation.go
- put_command_data_with_json.go
- put_compare_exchange_value_operation.go
- put_connection_string_operation.go
- put_connection_string_result.go
- put_document_command.go
- put_index_result.go
- put_indexes_operation.go
- put_indexes_response.go
- put_result.go
- query_command.go
- query_data.go
- query_field_util.go
- query_operation.go
- query_operation_options.go
- query_operator.go
- query_operator_token.go
- query_result.go
- query_result_base.go
- query_statistics.go
- query_stream_command.go
- query_token.go
- raft_id_generator.go
- range_builder.go
- range_facet.go
- raven_command.go
- raven_command_response_type.go
- raven_connection_string.go
- raw_document_query.go
- read_balance_behavior.go
- reflect.go
- replication_node.go
- request_executor.go
- requests_helpers.go
- reset_index_operation.go
- response_dispose_handling.go
- response_time_information.go
- revision.go
- revisions_collection_configuration.go
- revisions_configuration.go
- script_resolver.go
- search_operator.go
- seed_identity_for_command.go
- semaphore.go
- server_node.go
- server_operation_executor.go
- server_wide_operation.go
- session_created_event_args.go
- session_info.go
- session_options.go
- set_indexes_lock_operation.go
- set_indexes_priority_operation.go
- shape_token.go
- size.go
- spatial_criteria.go
- spatial_criteria_factory.go
- spatial_field_type.go
- spatial_options.go
- spatial_options_factory.go
- spatial_relation.go
- spatial_search_strategy.go
- spatial_units.go
- start_index_operation.go
- start_indexing_operation.go
- starts_with_args.go
- stop_index_operation.go
- stop_indexing_operation.go
- stream_command.go
- stream_operation.go
- stream_query_statistics.go
- stream_result.go
- stream_result_response.go
- string_array.go
- string_distance_types.go
- string_utils.go
- subscription_batch.go
- subscription_connection_client_message.go
- subscription_connection_server_message.go
- subscription_creation_options.go
- subscription_opening_strategy.go
- subscription_state.go
- subscription_state_with_node_details.go
- subscription_tryout.go
- subscription_worker.go
- subscription_worker_options.go
- suggest_token.go
- suggestion_base.go
- suggestion_builder.go
- suggestion_document_query.go
- suggestion_options.go
- suggestion_query_base.go
- suggestion_result.go
- suggestion_sort_mode.go
- suggestion_with_term.go
- suggestion_with_terms.go
- tcp_connection_header_message.go
- tcp_connection_header_response.go
- tcp_connection_info.go
- tcp_connection_status.go
- tcp_negotiate_parameters.go
- tcp_negotiation.go
- tcp_utils.go
- terms_query_result.go
- time.go
- time_utils.go
- topology.go
- true_token.go
- update_external_replication_operation.go
- url_utils.go
- util.go
- uuid.go
- where_operator.go
- where_params.go
- where_token.go
- wkt_criteria.go
- wkt_field.go