Project

General

Profile

hint.patch

Alexandru Lungu, 03/05/2024 05:59 AM

Download (2.61 KB)

View differences:

new/src/com/goldencode/p2j/persist/AdaptiveQuery.java 2024-02-13 10:26:42 +0000
553 553
   /** Flag to check the ability to fetch the records in a lazy manner, without server-side invalidation */
554 554
   private Boolean lazyMode = null;
555 555
   
556
   private boolean forceFullResults = false;
557
   
556 558
   /**
557 559
    * Default constructor. Initialization is deferred until <code>initialize()</code> is
558 560
    * called.
......
3081 3083
         return new ScrollingResults(persistence, executeScroll(persistence, fql, args, true));
3082 3084
      }
3083 3085
      
3084
      if (cacheOnReval || probablyRequiresResort())
3086
      if (forceFullResults || cacheOnReval || probablyRequiresResort())
3085 3087
      {
3086 3088
         results = super.executeQuery(persistence, fql, args);
3087 3089
      }
......
3855 3857
                 exc);
3856 3858
      }
3857 3859
   }
3860

  
3861
   public void hintFullResults()
3862
   {
3863
      this.forceFullResults = true;
3864
   }
3858 3865
   
3859 3866
   /**
3860 3867
    * An implementation of the {@link Results} interface which uses a single
new/src/com/goldencode/p2j/persist/BufferImpl.java 2024-02-13 10:25:01 +0000
11557 11557

  
11558 11558
         try
11559 11559
         {
11560
            fillQuery.hintFullResults();
11560 11561
            fillQuery.queryOpen();
11561 11562
            fillQuery.first();
11562 11563
            Long[] rowids = dataSource.getRestartRowids();
new/src/com/goldencode/p2j/persist/P2JQuery.java 2024-02-13 10:24:57 +0000
2319 2319
    * form from generated at conversion time. 
2320 2320
    */
2321 2321
   public void clearDynamicFilters();
2322

  
2323
   public default void hintFullResults()
2324
   {
2325
      // no-op
2326
   }
2322 2327
   
2323 2328
   /**
2324 2329
    * Adds a listener to be notified when this query is opened or closed.
new/src/com/goldencode/p2j/persist/QueryWrapper.java 2024-02-13 10:25:54 +0000
584 584
      
585 585
      TransactionManager.registerOffEndQuery(this);
586 586
   }
587

  
588
   public void hintFullResults()
589
   {
590
      if (delegate != null)
591
      {
592
         delegate.hintFullResults();
593
      }
594
   }
587 595
   
588 596
   /**
589 597
    * Register the cleaner which closes the query when the external [persistent] procedure in