github.com/altipla-consulting/ravendb-go-client@v0.1.3/advanced_session_operations.go (about)

     1  package ravendb
     2  
     3  import (
     4  	"io"
     5  	"reflect"
     6  	"time"
     7  )
     8  
     9  // Note: Java's IAdvancedSessionOperations and IAdvancedDocumentSessionOperations
    10  // is AdvancedSessionOperations
    11  
    12  // AdvancedSessionOperations exposes advanced session operations
    13  type AdvancedSessionOperations struct {
    14  	s *DocumentSession
    15  }
    16  
    17  func (o *AdvancedSessionOperations) GetDocumentStore() *DocumentStore {
    18  	return o.s.GetDocumentStore()
    19  }
    20  
    21  func (o *AdvancedSessionOperations) Attachments() *AttachmentsSessionOperations {
    22  	return o.s.Attachments()
    23  }
    24  
    25  func (o *AdvancedSessionOperations) Revisions() *RevisionsSessionOperations {
    26  	return o.s.Revisions()
    27  }
    28  
    29  func (o *AdvancedSessionOperations) Eagerly() *EagerSessionOperations {
    30  	return o.s.Eagerly()
    31  }
    32  
    33  func (o *AdvancedSessionOperations) Lazily() *LazySessionOperations {
    34  	return o.s.Lazily()
    35  }
    36  
    37  func (o *AdvancedSessionOperations) GetChangeVectorFor(instance interface{}) (*string, error) {
    38  	return o.s.GetChangeVectorFor(instance)
    39  }
    40  
    41  func (o *AdvancedSessionOperations) GetMetadataFor(instance interface{}) (*MetadataAsDictionary, error) {
    42  	return o.s.GetMetadataFor(instance)
    43  }
    44  
    45  func (o *AdvancedSessionOperations) GetRequestExecutor() *RequestExecutor {
    46  	return o.s.GetRequestExecutor()
    47  }
    48  
    49  // GetNumberOfRequests returns number of requests sent to the server
    50  func (o *AdvancedSessionOperations) GetNumberOfRequests() int {
    51  	return o.s.GetNumberOfRequests()
    52  }
    53  
    54  func (o *AdvancedSessionOperations) Defer(commands ...ICommandData) {
    55  	o.s.Defer(commands...)
    56  }
    57  
    58  func (o *AdvancedSessionOperations) Patch(entity interface{}, path string, value interface{}) error {
    59  	return o.s.Patch(entity, path, value)
    60  }
    61  
    62  func (o *AdvancedSessionOperations) PatchByID(id string, path string, value interface{}) error {
    63  	return o.s.PatchByID(id, path, value)
    64  }
    65  
    66  func (o *AdvancedSessionOperations) PatchArray(entity interface{}, pathToArray string, arrayAdder func(*JavaScriptArray)) error {
    67  	return o.s.PatchArray(entity, pathToArray, arrayAdder)
    68  }
    69  
    70  func (o *AdvancedSessionOperations) PatchArrayByID(id string, pathToArray string, arrayAdder func(*JavaScriptArray)) error {
    71  	return o.s.PatchArrayByID(id, pathToArray, arrayAdder)
    72  }
    73  
    74  func (o *AdvancedSessionOperations) Increment(entity interface{}, path string, valueToAdd interface{}) error {
    75  	return o.s.Increment(entity, path, valueToAdd)
    76  }
    77  
    78  func (o *AdvancedSessionOperations) IncrementByID(id string, path string, valueToAdd interface{}) error {
    79  	return o.s.IncrementByID(id, path, valueToAdd)
    80  }
    81  
    82  func (o *AdvancedSessionOperations) Refresh(entity interface{}) error {
    83  	return o.s.Refresh(entity)
    84  }
    85  
    86  func (o *AdvancedSessionOperations) RawQuery(rawQuery string) *RawDocumentQuery {
    87  	return o.s.RawQuery(rawQuery)
    88  }
    89  
    90  func (o *AdvancedSessionOperations) Query(opts *DocumentQueryOptions) *DocumentQuery {
    91  	return o.s.Query(opts)
    92  }
    93  
    94  func (o *AdvancedSessionOperations) QueryCollection(collectionName string) *DocumentQuery {
    95  	return o.s.QueryCollection(collectionName)
    96  }
    97  
    98  func (o *AdvancedSessionOperations) QueryCollectionForType(typ reflect.Type) *DocumentQuery {
    99  	return o.s.QueryCollectionForType(typ)
   100  }
   101  
   102  func (o *AdvancedSessionOperations) QueryIndex(indexName string) *DocumentQuery {
   103  	return o.s.QueryIndex(indexName)
   104  }
   105  
   106  func (o *AdvancedSessionOperations) StreamQuery(query *DocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error) {
   107  	return o.s.StreamQuery(query, streamQueryStats)
   108  }
   109  
   110  func (o *AdvancedSessionOperations) StreamRawQuery(query *RawDocumentQuery, streamQueryStats *StreamQueryStatistics) (*StreamIterator, error) {
   111  	return o.s.StreamRawQuery(query, streamQueryStats)
   112  }
   113  
   114  func (o *AdvancedSessionOperations) StreamRawQueryInto(query *RawDocumentQuery, output io.Writer) error {
   115  	return o.s.StreamRawQueryInto(query, output)
   116  }
   117  
   118  func (o *AdvancedSessionOperations) StreamQueryInto(query *DocumentQuery, output io.Writer) error {
   119  	return o.s.StreamQueryInto(query, output)
   120  }
   121  
   122  func (o *AdvancedSessionOperations) Exists(id string) (bool, error) {
   123  	return o.s.Exists(id)
   124  }
   125  
   126  func (o *AdvancedSessionOperations) WhatChanged() (map[string][]*DocumentsChanges, error) {
   127  	return o.s.WhatChanged()
   128  }
   129  
   130  func (o *AdvancedSessionOperations) Evict(entity interface{}) error {
   131  	return o.s.Evict(entity)
   132  }
   133  
   134  func (o *AdvancedSessionOperations) GetDocumentID(instance interface{}) string {
   135  	return o.s.GetDocumentID(instance)
   136  }
   137  
   138  func (o *AdvancedSessionOperations) GetLastModifiedFor(instance interface{}) (*time.Time, error) {
   139  	return o.s.GetLastModifiedFor(instance)
   140  }
   141  
   142  func (o *AdvancedSessionOperations) HasChanges() bool {
   143  	return o.s.HasChanges()
   144  }
   145  
   146  func (o *AdvancedSessionOperations) HasChanged(entity interface{}) (bool, error) {
   147  	return o.s.HasChanged(entity)
   148  }
   149  
   150  func (o *AdvancedSessionOperations) WaitForReplicationAfterSaveChanges(options func(*ReplicationWaitOptsBuilder)) {
   151  	o.s.WaitForReplicationAfterSaveChanges(options)
   152  }
   153  
   154  func (o *AdvancedSessionOperations) WaitForIndexesAfterSaveChanges(options func(*IndexesWaitOptsBuilder)) {
   155  	o.s.WaitForIndexesAfterSaveChanges(options)
   156  }
   157  
   158  func (o *AdvancedSessionOperations) IsLoaded(id string) bool {
   159  	return o.s.IsLoaded(id)
   160  }
   161  
   162  func (o *AdvancedSessionOperations) IgnoreChangesFor(entity interface{}) error {
   163  	return o.s.IgnoreChangesFor(entity)
   164  }
   165  
   166  func (o *AdvancedSessionOperations) Stream(args *StartsWithArgs) (*StreamIterator, error) {
   167  	return o.s.Stream(args)
   168  }
   169  
   170  func (o *AdvancedSessionOperations) Clear() {
   171  	o.s.Clear()
   172  }
   173  
   174  func (o *AdvancedSessionOperations) GetCurrentSessionNode() (*ServerNode, error) {
   175  	return o.s.GetCurrentSessionNode()
   176  }
   177  
   178  func (o *AdvancedSessionOperations) AddBeforeStoreListener(handler func(*BeforeStoreEventArgs)) int {
   179  	return o.s.AddBeforeStoreListener(handler)
   180  }
   181  
   182  func (o *AdvancedSessionOperations) RemoveBeforeStoreListener(handlerID int) {
   183  	o.s.RemoveBeforeStoreListener(handlerID)
   184  }
   185  
   186  func (o *AdvancedSessionOperations) AddAfterSaveChangesListener(handler func(*AfterSaveChangesEventArgs)) int {
   187  	return o.s.AddAfterSaveChangesListener(handler)
   188  }
   189  
   190  func (o *AdvancedSessionOperations) RemoveAfterSaveChangesListener(handlerID int) {
   191  	o.s.RemoveAfterSaveChangesListener(handlerID)
   192  }
   193  
   194  func (o *AdvancedSessionOperations) AddBeforeDeleteListener(handler func(*BeforeDeleteEventArgs)) int {
   195  	return o.s.AddBeforeDeleteListener(handler)
   196  }
   197  
   198  func (o *AdvancedSessionOperations) RemoveBeforeDeleteListener(handlerID int) {
   199  	o.s.RemoveBeforeDeleteListener(handlerID)
   200  }
   201  
   202  func (o *AdvancedSessionOperations) AddBeforeQueryListener(handler func(*BeforeQueryEventArgs)) int {
   203  	return o.s.AddBeforeQueryListener(handler)
   204  }
   205  
   206  func (o *AdvancedSessionOperations) RemoveBeforeQueryListener(handlerID int) {
   207  	o.s.RemoveBeforeQueryListener(handlerID)
   208  }
   209  
   210  func (o *AdvancedSessionOperations) LoadStartingWith(results interface{}, args *StartsWithArgs) error {
   211  	return o.s.LoadStartingWith(results, args)
   212  }
   213  
   214  func (o *AdvancedSessionOperations) LoadStartingWithIntoStream(output io.Writer, args *StartsWithArgs) error {
   215  	return o.s.LoadStartingWithIntoStream(output, args)
   216  }
   217  
   218  func (o *AdvancedSessionOperations) LoadIntoStream(ids []string, output io.Writer) error {
   219  	return o.s.LoadIntoStream(ids, output)
   220  }
   221  
   222  func (o *AdvancedSessionOperations) GetMaxNumberOfRequestsPerSession() int {
   223  	return o.s.maxNumberOfRequestsPerSession
   224  }
   225  
   226  func (o *AdvancedSessionOperations) SetMaxNumberOfRequestsPerSession(n int) {
   227  	o.s.maxNumberOfRequestsPerSession = n
   228  }
   229  
   230  /*
   231  String storeIdentifier();
   232  boolean isUseOptimisticConcurrency();
   233  void setUseOptimisticConcurrency(boolean useOptimisticConcurrency);
   234  
   235  EntityToJson getEntityToJson();
   236  */
   237  
   238  /*
   239  Map<String, Object> getExternalState();
   240  */