~zorba-coders/zorba/bugs-912586-912593-912722

« back to all changes in this revision

Viewing changes to src/store/naive/simple_pul.h

  • Committer: Cezar Andrei
  • Date: 2012-03-28 15:42:12 UTC
  • mfrom: (10606.1.129 zorba)
  • Revision ID: cezar.lp@cezarandrei.com-20120328154212-jh2heq49xcqjppce
Merge from trunck and resolve ChangeLog conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <vector>
20
20
 
21
 
#include "store/naive/shared_types.h"
 
21
#include "shared_types.h"
22
22
 
23
23
#include "store/api/pul.h"
24
24
#include "store/api/index.h"
43
43
class IndexKey;
44
44
class PULImpl;
45
45
class QNameItem;
46
 
class SimpleCollection;
 
46
class Collection;
47
47
class InternalNode;
48
48
class TextNode;
49
49
 
153
153
 
154
154
protected:
155
155
  // Bookeeping
156
 
  SimpleCollection                 * theCollection;
 
156
  Collection                 * theCollection;
157
157
 
158
158
  PULImpl                          * thePul;
159
159
 
183
183
  std::vector<UpdatePrimitive*>      theCreateCollectionList;
184
184
  std::vector<UpdatePrimitive*>      theInsertIntoCollectionList;
185
185
  std::vector<UpdatePrimitive*>      theDeleteFromCollectionList;
 
186
  std::vector<UpdatePrimitive*>      theTruncateCollectionList;
186
187
  std::vector<UpdatePrimitive*>      theDeleteCollectionList;
187
188
 
188
189
  // Validate in place primitives
194
195
  std::vector<XmlNode*>              theDeletedDocs;
195
196
 
196
197
  std::vector<IndexImpl*>            theIncrementalIndices;
 
198
  std::vector<IndexImpl*>            theTruncatedIndices;
197
199
 
198
200
  std::vector<IndexEntryCreator_t>   theIndexEntryCreators;
199
201
 
203
205
  std::vector<store::IndexDelta>     theDeletedDocsIndexDeltas;
204
206
 
205
207
public:
206
 
  CollectionPul(PULImpl* pul, SimpleCollection* collection);
 
208
  CollectionPul(PULImpl* pul, Collection* collection);
207
209
 
208
210
  ~CollectionPul();
209
211
 
465
467
        bool isLast,
466
468
        bool dyn_collection = false);
467
469
 
 
470
  void addTruncateCollection(
 
471
        const QueryLoc* aQueryLoc,
 
472
        store::Item_t& name,
 
473
        bool dyn_collection = false);
 
474
 
468
475
  // Index primitives
469
476
  void addCreateIndex(
470
477
        const QueryLoc* aQueryLoc,
539
546
  // utils
540
547
  void checkTransformUpdates(const std::vector<store::Item*>& rootNodes) const;
541
548
 
542
 
  void getIndicesToRefresh(std::vector<store::Index*>& indices);
 
549
  void getIndicesToRefresh(
 
550
      std::vector<store::Index*>& indices,
 
551
      std::vector<store::Index*>& truncate_indices);
543
552
 
544
553
  void addIndexEntryCreator(
545
554
        const store::Item* collectionName,
546
555
        store::Index* idx,
547
556
        store::IndexEntryCreator* creator);
548
557
 
 
558
  void addIndexTruncator(
 
559
      const store::Item* collectionName,
 
560
      store::Index* idx);
 
561
 
549
562
  void setValidator(store::SchemaValidator* validator);
550
563
  store::SchemaValidator* getValidator() const { return theValidator; }
551
564