Created
May 1, 2011 17:34
-
-
Save adh/950666 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
/\___/\ dfsch version 0.4.0-dev | |
( o o ) (rel-0.3.0-937-g451e094) [May 1 2011 15:05:17] | |
== * == dfsch is free software, and you are welcome to redistribute it | |
) ( under certain conditions; see file COPYING for details. | |
]=> (define t (tokyo-cabinet:open-table "foo.tab")) | |
#<tokyo-cabinet:table 0x2206160 > | |
]=> (define (print-results idl) | |
..> (for-each (lambda (id) (write (collection->list (map-ref t id))) (newline)) idl)) | |
#<standard-function 0x21e35f0 print-results(idl)> | |
]=> (define q (tokyo-cabinet:make-query t)) | |
#<tokyo-cabinet:query 0x2213740 > | |
]=> (print-results (tokyo-cabinet:query-search q)) | |
(("class" "U") ("name" "Random") ("surname" "User")) | |
(("class" "A") ("name" "James") ("surname" "Hacker")) | |
() | |
]=> (tokyo-cabinet:add-condition! q "name" :equal "James") | |
() | |
]=> (print-results (tokyo-cabinet:query-search q)) | |
(("class" "A") ("name" "James") ("surname" "Hacker")) | |
() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment