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-1171.htm below:

map-query

map-query Summary

Returns the results of mapping a function across a SQL query statement.

Signature

map-query output-type-spec function query-exp &key database not-inside-transaction get-all => result

Arguments

output-type-spec

The output type specification.

function

A function.

query-exp

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

database

A database.

not-inside-transaction

A generalized boolean.

get-all

A generalized boolean.

Values

result

A sequence of type output-type-spec containing the results of the map function.

Description

The function map-query returns the result of mapping function across the results of query-exp. The output-type-spec argument specifies the type of the result sequence as per the Common Lisp map function.

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

This example binds name to each name in the employee table and prints it.

(map-query
   nil
   #'(lambda (name) (print name))
   [select [ename] :from [emp] :flatp t])

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