[groovy-website] branch asf-site updated: Update release notes for 4.0

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

[groovy-website] branch asf-site updated: Update release notes for 4.0

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

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


The following commit(s) were added to refs/heads/asf-site by this push:
     new 6971d1c  Update release notes for 4.0
6971d1c is described below

commit 6971d1cb12aae78a57e60f33bc50a6e487dd728b
Author: Daniel Sun <[hidden email]>
AuthorDate: Sat Nov 21 13:59:37 2020 +0800

    Update release notes for 4.0
---
 site/src/site/releasenotes/groovy-4.0.adoc | 23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/site/src/site/releasenotes/groovy-4.0.adoc b/site/src/site/releasenotes/groovy-4.0.adoc
index 29402b4..5dc1222 100644
--- a/site/src/site/releasenotes/groovy-4.0.adoc
+++ b/site/src/site/releasenotes/groovy-4.0.adoc
@@ -501,29 +501,30 @@ In Groovy 4.0, additional support has been added.
 
 === Other areas under investigation
 
-==== .Net-inspired changes (under investigation)
+==== GINQ, a.k.a. Groovy-Integrated Query (incubating)
 
-Can we provide a Groovy equivalent to .Net's Language Integrated Query (LINQ)?
-It would support code like below:
+GINQ supports querying collections in a SQL-like style.
 
 [source,groovy]
 --------------------------------------
-from p of persons
-leftjoin c of cities
-on p.city.name == c.name
-select p.name, c.name
+from p in persons
+leftjoin c in cities on p.city.name == c.name
+where c.name == 'Shanghai'
+select p.name, c.name as cityName
 
-from p of persons
+from p in persons
 groupby p.gender
 having p.gender == 'Male'
 select p.gender, max(p.age)
 
-from p of persons
-orderby p.age desc
-thenby p.name asc
+from p in persons
+orderby p.age in desc, p.name
 select p.name
 --------------------------------------
 
+More examples could be found at
+link:https://github.com/apache/groovy/blob/master/subprojects/groovy-ginq/src/spec/test/org/apache/groovy/ginq/GinqTest.groovy[GINQ examples]
+
 ==== Python-inspired changes (under investigation)
 
 Can we support additional destructuring options

Apache Groovy committer & PMC member

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