freenode/lisp - IRC Chatlog
Search
8:47:12
asarch
With Datafly I prepare the SQL statement: (insert-into :students (set= :last_name "Uzumaki" :first_name "Naruto" :address "Ever green st #598, Konoha" (returning :id))
8:47:53
asarch
With the database connection: (with-connection (db :school) (execute (insert-into :students (set= ...
8:48:18
asarch
However, neither of those expression actually returns the id of the newly record created
8:49:17
asarch
Reading the issues about the Datafly project, https://github.com/fukamachi/datafly/issues/7, a fellow says there is an expression to get the id using SQLite3: sqlite3:last-insert-rowid
10:20:44
VincentVega
Is there a way to capture all values that a function returns without specifying the values one by one with multiple-value-bind? Maybe put them in a list or something?
10:40:42
kpoeck_
phoe: cl-postgres seem to reside in postmodern, see https://github.com/marijnh/Postmodern/blob/master/cl-postgres.asd
10:44:52
phoe
kpoeck_: yes, though technically one can use cl-postgres without postmodern, since the latter builds on top of the former
11:31:54
phantomics
Is there a way to change the epsilon used when comparing floats? If I do for example (let ((single-float-epsilon ...)) (= num1 num2)) it fails because single-float-epsilon is a constant
17:01:34
VincentVega
Hmm can I write my own reader macro that start with #+, e.g. #+my-reader or would it conflict with #+sbcl and such?
17:10:53
phoe
named-readtables provides an in-readtable macro that you can use similarly to in-package at the top of the file
18:47:34
pfdietz
I definitely suggest using named-readtables. Also, use readtable changes sparingly.
18:52:55
aeth
reader macros are good if (0) they're dispatch reader macros starting with # like #z; (1) the thing they work on is contained within parentheses like #z() such as #z(42) not #z42; and (2) they expand into a macro that does all of the actual processing