Skip to content

Instantly share code, notes, and snippets.

@kumarshantanu
Created August 31, 2010 03:18
Show Gist options
  • Save kumarshantanu/558488 to your computer and use it in GitHub Desktop.
Save kumarshantanu/558488 to your computer and use it in GitHub Desktop.
(in-db db
(let [e (find-by-id blog-entry-meta 2)
r ((find-rels e entry-comment-meta) e)
c (first r)
s (find-siblings c e)
sc (find-siblings c e :cols [:content :name :email])
sw (find-siblings c e :where ["name LIKE ?" "Phi%"])
sb (find-siblings c e :cols [:content :name :email] :where ["name LIKE ?" "Phi%"])]
(ppe "\nChild: " c)
(ppe "\nSiblings:" s)
(ppe "\nSiblings with selected columns:" sc)
(ppe "\nSiblings with WHERE clause:" sw)
(ppe "\nSiblings with selected columns and WHERE clause:" sb)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment