~juan457/+junk/zorba

« back to all changes in this revision

Viewing changes to src/store/naive/store.cpp

  • Committer: Markos Zaharioudakis
  • Date: 2012-07-11 15:38:39 UTC
  • mfrom: (10924 zorba)
  • mto: This revision was merged to the branch mainline in revision 10932.
  • Revision ID: markos_za@yahoo.com-20120711153839-0mkh15cg2ubknchd
work in progress

Show diffs side-by-side

added added

removed removed

Lines of Context:
617
617
    {
618
618
      bool more = true;
619
619
 
 
620
#ifdef ZORBA_WITH_JSON
 
621
      assert(domainNode->isNode() || domainNode->isJSONItem());
 
622
#else
620
623
      assert(domainNode->isNode());
 
624
#endif
621
625
      assert(keyItem == NULL);
622
626
 
623
627
      // Compute the keys associated with the current domain node. Note: We
636
640
 
637
641
        // If current node has no keys, put it in the "null" entry and continue
638
642
        // with the next domain node, if nay.
 
643
#ifdef ZORBA_WITH_JSON
 
644
        if (!more || firstKeyItem->isNode() || firstKeyItem->isJSONItem())
 
645
#else
639
646
        if (!more || firstKeyItem->isNode())
 
647
#endif
640
648
        {
641
649
          index->insert(keyItem, domainNode);
642
650
 
649
657
 
650
658
        // If current domain node has exactly 1 key, insert it in the index
651
659
        // and continue with next domain node, if any.
 
660
#ifdef ZORBA_WITH_JSON
 
661
        if (!more || keyItem->isNode() || keyItem->isJSONItem())
 
662
#else
652
663
        if (!more || keyItem->isNode())
 
664
#endif
653
665
        {
654
666
          index->insert(firstKeyItem, domainNode);
655
667
 
670
682
        // Compute next keys or next domain node.
671
683
        while ((more = sourceIter->next(keyItem)))
672
684
        {
 
685
#ifdef ZORBA_WITH_JSON
 
686
          if (keyItem->isNode() || keyItem->isJSONItem())
 
687
#else
673
688
          if (keyItem->isNode())
 
689
#endif
674
690
          {
675
691
            domainNode.transfer(keyItem);
676
692
            break;