Created
August 31, 2010 02:10
-
-
Save kumarshantanu/558419 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(in-db db | |
(let [e1 (find-by-id blog-entry-meta 1) | |
ea (find-by-criteria blog-entry-meta) ;; finds all records | |
ec (find-by-criteria blog-entry-meta :cols [:title :content]) | |
ew (find-by-criteria blog-entry-meta :where ["title=?" "Hello World"]) | |
eb (find-by-criteria blog-entry-meta :cols [:title :content] :where ["title LIKE ?" "Hello%"])] | |
(ppe "Entry 1:" e1) | |
(ppe "All Entries:" ea) | |
(ppe "Entries with selected columns:" ec) | |
(ppe "Entries with WHERE clause:" ew) | |
(ppe "Entries with selected columns and WHERE clause:" eb))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment