A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.lispworks.com/documentation/lw71/LW/html/lw-1150.htm below:

do-query

do-query Summary

Repeatedly binds a set of variables to the results of a query, and executes a body of code using the bound variables.

Signature

do-query ((&rest args) query &key database not-inside-transaction get-all) &body body =>

Arguments

args

A set of variables.

query

A database query or a prepared-statement containing a query.

database

A database.

not-inside-transaction

A generalized boolean.

get-all

A generalized boolean.

body

A Lisp code body.

Description

The macro do-query repeatedly executes body within a binding of args on the attributes of each record resulting from query. do-query returns no values.

The default value of database is *default-database*.

not-inside-transaction and get-all may be useful when fetching many records through a connection with database-type :mysql. Both of these arguments have default value nil. See the section Special considerations for iteration functions and macros for details.

Example

The following code repeatedly binds the result of selecting an entry in ename from the table emp to the variable name, and then prints name using the Lisp function print.

(do-query ((name) [select [ename] :from [emp]])
         (print name))

LispWorks User Guide and Reference Manual - 20 Sep 2017


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4