- $db-row-obj qprocedure
Execute the given query q on the database and return an one-argument procedure which takes as argument the name of the database field to get the value.
Example:
(let ((& ($db-row-obj "select full_name, phone from users where user_id=1"))) (<p> "Full name: " (& 'full_name)) (<p> "Phone: " (& 'phone)))
Warning: currently $db-row-obj is only implemented for PostgreSQL databases.
If you use the awful-ssql egg, you can give $db the query as a SSQL expression. See the documentation for awful-ssql for more details. Support for SSQL has been introduced in awful version 0.40.0.