Skip to content

Instantly share code, notes, and snippets.

@zindel
Created February 10, 2016 14:19
Show Gist options
  • Save zindel/4cbcbc8add559290ff00 to your computer and use it in GitHub Desktop.
Save zindel/4cbcbc8add559290ff00 to your computer and use it in GitHub Desktop.
use-query:
title: Using Query
type: make
entity: individual
fields:
- identity.fullname
- identity.birthdate
- sex
query: |
/do(
$_mother := insert(individual := {sex := 'female'}),
$_father := insert(individual := {sex := 'male'}),
$_individual := insert(individual := {
sex := $sex,
mother := $_mother,
father := $_father,
}),
with($identity, insert(identity := {
individual := $_individual,
fullname := $fullname,
birthdate := $birthdate,
})),
{id := $_individual}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment