From 2e92c4e3b6b2068ecdac49f9ade89d76987ce410 Mon Sep 17 00:00:00 2001 From: Kei Hibino Date: Thu, 25 Dec 2014 10:23:17 +0900 Subject: [PATCH] Publish --- doc/slide/tsukuba-201412/DSL.html | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/slide/tsukuba-201412/DSL.html b/doc/slide/tsukuba-201412/DSL.html index c04857f7..bbc61d6d 100644 --- a/doc/slide/tsukuba-201412/DSL.html +++ b/doc/slide/tsukuba-201412/DSL.html @@ -252,6 +252,13 @@ birthdayHeiseiDesc = aggregateRelation Desc return $ gbd >< personCount

orders by the number of people born on the same Heisei period dates:

+
SELECT ALL T1.day AS f0, COUNT (T0.name) AS f1
+  FROM PUBLIC.person T0 INNER JOIN PUBLIC.birthday T1
+    ON (T0.name = T1.name)
+ WHERE (T1.day >= DATE '1989-01-08')
+ GROUP BY T1.day ORDER BY COUNT (T0.name) DESC
+
+

Ordering Example

SELECT ALL T1.day AS f0, COUNT (T0.name) AS f1
   FROM PUBLIC.person T0 INNER JOIN PUBLIC.birthday T1
     ON (T0.name = T1.name)
@@ -334,6 +341,13 @@ personAndBirthdayP2 =  relation' $=> (a -> b) -> Placeholders a -> Placeholders b
 (|*|) :: Placeholders (a -> b) -> Placeholders a -> Placeholders b

Generated SQL:

+
SELECT ALL T0.name AS f0, T0.age AS f1, T0.address AS f2,
+           T1.name AS f3, T1.day AS f4
+      FROM PUBLIC.person T0 INNER JOIN PUBLIC.birthday T1
+        ON (((T0.name = ?) AND (T0.age = ?)) AND (T0.address = ?))
+
+

Record Mapping - Placeholders

+

Generated SQL:

SELECT ALL T0.name AS f0, T0.age AS f1, T0.address AS f2,
            T1.name AS f3, T1.day AS f4
       FROM PUBLIC.person T0 INNER JOIN PUBLIC.birthday T1