[groovy] branch master updated: Tweak doco

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[groovy] branch master updated: Tweak doco

Daniel.Sun
This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 88a8d55  Tweak doco
88a8d55 is described below

commit 88a8d558e144bd9969f9aea8fead57f026cf2c94
Author: Daniel Sun <[hidden email]>
AuthorDate: Sun Nov 22 20:45:19 2020 +0800

    Tweak doco
---
 subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
index bd53843..8a0bcbf 100644
--- a/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
+++ b/subprojects/groovy-ginq/src/spec/doc/ginq-userguide.adoc
@@ -67,6 +67,16 @@ include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_execution_01,i
 ----
 include::../test/org/apache/groovy/ginq/GinqTest.groovy[tags=ginq_execution_02,indent=0]
 ----
+And it is strongly recommended to use `def` to define the variable for the result of GINQ execution:
+```groovy
+def result = GQ {
+    /* GINQ CODE */
+}
+def stream = result.stream() // get the stream from GINQ result
+def list = result.toList() // get the list from GINQ result
+```
+[WARNING]
+Currently GINQ can not work well when STC is enabled.
 
 === GINQ Syntax
 ==== Data Source

Apache Groovy committer & PMC member

Blog: http://blog.sunlan.me
Twitter: @daniel_sun