]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Tweaks to the Java-side UDF docs.
authorstephan <stephan@noemail.net>
Fri, 28 Jul 2023 09:54:39 +0000 (09:54 +0000)
committerstephan <stephan@noemail.net>
Fri, 28 Jul 2023 09:54:39 +0000 (09:54 +0000)
FossilOrigin-Name: 48e0079d8db675a8761f27348bc6795aa6b6e49a3f76bd4adece83309dcf2aff

ext/jni/src/org/sqlite/jni/SQLFunction.java
manifest
manifest.uuid

index 396602b95908cb816bf6be358473cee2b0ce96e9..78b716dd22b6988f8f80892d6228a16e86e1d9e7 100644 (file)
@@ -53,15 +53,16 @@ public abstract class SQLFunction {
        methods, passing it that method's first argument and an initial
        value for the persistent state. If there is currently no
        mapping for cx.getAggregateContext() within the map, one is
-       created using the given initial value, else an existing one is
-       use and the 2nd argument is ignored.  It returns a ValueHolder
-       which can be used to modify that state directly without
-       requiring that the user update the underlying map.
+       created using the given initial value, else the existing one is
+       used and the 2nd argument is ignored.  It returns a
+       ValueHolder<T> which can be used to modify that state directly
+       without requiring that the client update the underlying map's
+       entry.
     */
     public ValueHolder<T> getAggregateState(sqlite3_context cx, T initialValue){
       ValueHolder<T> rc = map.get(cx.getAggregateContext());
       if(null == rc){
-        map.put(cx.getAggregateContext(), rc = new ValueHolder<T>(initialValue));
+        map.put(cx.getAggregateContext(), rc = new ValueHolder<>(initialValue));
       }
       return rc;
     }
@@ -70,9 +71,10 @@ public abstract class SQLFunction {
        Should be called from a UDF's xFinal() method and passed that
        method's first argument. This function removes the value
        associated with cx.getAggregateContext() from the map and
-       returns it, returning null if no other UDF method has not been
-       called to set up such a mapping. That will be the case if an
-       aggregate is used in a statement which has no result rows.
+       returns it, returning null if no other UDF method has been
+       called to set up such a mapping. The latter condition will be
+       the case if an aggregate is used in a statement which has no
+       result rows.
     */
     public T takeAggregateState(sqlite3_context cx){
       final ValueHolder<T> h = map.remove(cx.getAggregateContext());
@@ -100,17 +102,17 @@ public abstract class SQLFunction {
     public abstract void xStep(sqlite3_context cx, sqlite3_value[] args);
     public abstract void xFinal(sqlite3_context cx);
 
-    //! See Scalar.xDestroy()
+    //! @see Scalar#xDestroy()
     public void xDestroy() {}
 
     private final ContextMap<T> map = new ContextMap<>();
 
-    //! See ContextMap<T>.getAggregateState().
+    //! @see ContextMap<T>#getAggregateState()
     protected final ValueHolder<T> getAggregateState(sqlite3_context cx, T initialValue){
       return map.getAggregateState(cx, initialValue);
     }
 
-    //! See ContextMap<T>.takeAggregateState().
+    //! @see ContextMap<T>#takeAggregateState()
     protected final T takeAggregateState(sqlite3_context cx){
       return map.takeAggregateState(cx);
     }
@@ -119,9 +121,9 @@ public abstract class SQLFunction {
   /**
      An SQLFunction subclass for creating window functions.  Note that
      Window<T> inherits from Aggregate<T> and each instance is
-     required to implemenat the inherited abstract methods from that
-     class. See Aggregate<T> for information on managing the call
-     state across matching calls of the UDF callbacks.
+     required to implement the inherited abstract methods from that
+     class. See Aggregate<T> for information on managing the UDF's
+     invocation-specific state.
   */
   public static abstract class Window<T> extends Aggregate<T> {
     public abstract void xInverse(sqlite3_context cx, sqlite3_value[] args);
index 324f25d9f92abfccc6b2be750cbf9ddf9027f189..a9fd93424cc3dc39841b3dc9f9a782e219344b99 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,5 +1,5 @@
-C More\sJava\sdocs\sabout\smaking\suse\sof\sthe\saggregate\scontext.\sChange\sthe\sJNI\smapping\sto\sset\sthe\ssqlite3_context::aggregateContext\smember\sdirectly,\sinstead\sof\svia\sa\ssuperflous\ssetter,\sbecause\sthat\sway\sis\sfaster.
-D 2023-07-28T09:25:05.029
+C Tweaks\sto\sthe\sJava-side\sUDF\sdocs.
+D 2023-07-28T09:54:39.514
 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
 F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@@ -239,7 +239,7 @@ F ext/jni/src/org/sqlite/jni/Collation.java 8dffbb00938007ad0967b2ab424d3c908413
 F ext/jni/src/org/sqlite/jni/NativePointerHolder.java 70dc7bc41f80352ff3d4331e2e24f45fcd23353b3641e2f68a81bd8262215861
 F ext/jni/src/org/sqlite/jni/OutputPointer.java 08a752b58a33696c5eaf0eb9361a0966b188dec40f4a3613eb133123951f6c5f
 F ext/jni/src/org/sqlite/jni/ProgressHandler.java 5a1d7b2607eb2ef596fcf4492a49d1b3a5bdea3af9918e11716831ffd2f02284
-F ext/jni/src/org/sqlite/jni/SQLFunction.java 268291ee7be1406b13a3b220df2eac59b9337473d5eb9fa40bd528eefb57252c
+F ext/jni/src/org/sqlite/jni/SQLFunction.java f35e0607e366f2efa9e220d3c7cbeac9470c74f7f612f18c2ba7b105d4bead59
 F ext/jni/src/org/sqlite/jni/SQLite3Jni.java 3582b30c0fb1cb39e25b9069fe8c9e2fe4f2659f4d38437b610e46143e163610
 F ext/jni/src/org/sqlite/jni/Tester1.java 7d8742eb6d6aba429171b2ba6136f4f17569a280676d846cbe319fa95a97ae4d
 F ext/jni/src/org/sqlite/jni/Tracer.java c2fe1eba4a76581b93b375a7b95ab1919e5ae60accfb06d6beb067b033e9bae1
@@ -2067,8 +2067,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
 F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
 F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
-P ff53f1ccdc1780f2d9bd5f59804a76dbdf4f6b70696d3a7dbdbd96d1f8f6fa5c
-R ce373f0682789ebfcc8ec45219320dda
+P 7af0cb998f7161296d5e5e50a42e9db26ec13c145c61194a999a1a0104818d45
+R fe9104758f9885099777084c98a80013
 U stephan
-Z 02ac0e260dba2cb9492d0ae9287f8a5f
+Z de93089c27325a9ac487304a0c51ee31
 # Remove this line to create a well-formed Fossil manifest.
index b0a799140d1006c385777ca5d29441cdd0a28488..a01414088cab8e0d6ae15a8dd8d8f9b97e4226d2 100644 (file)
@@ -1 +1 @@
-7af0cb998f7161296d5e5e50a42e9db26ec13c145c61194a999a1a0104818d45
\ No newline at end of file
+48e0079d8db675a8761f27348bc6795aa6b6e49a3f76bd4adece83309dcf2aff
\ No newline at end of file