Skip to content

Instantly share code, notes, and snippets.

@ashigeru
Created July 2, 2011 15:14
Show Gist options
  • Save ashigeru/1060729 to your computer and use it in GitHub Desktop.
Save ashigeru/1060729 to your computer and use it in GitHub Desktop.
Limited DMTL
-- 実験
using a : tx
with x, y, z : constant
match
case a.x_id = x.id
&& a.y_id = y.id
&& a.z_id = z.id
=> a / {x_name = x.name, y_name = y.name, z_name = z.name} into out
case _
=> a into failed
;
-- creates a flow part :: (a : tx, (x, y, z) : constant) -> (out : tx, failed : tx)
FROM a : tx
WITH x, y, z : constant
WHERE a.x_id = x.id
AND a.y_id = y.id
AND a.z_id = z.id
SELECT a / {x_name = x.name, y_name = y.name, z_name = z.name}
INTO out
OR
SELECT a INTO failed
;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment