Version: 4.2.0.5
6.2.2 The #:what clause

The #:what clause specifies the result type of the query. The data in the #:what clause must be derived from that selected in the #:from clause.

For example, the query:

  (sql (select #:from person))

has a result type of person, whereas the query:

  (sql (select #:what person.name #:from person))

has a result type of string. The expression:

  (find-all (sql (select #:what person.name #:from person)))

would therefore return a (listof person).

The #:what clause can be one of the following:

If the #:what clause is omitted, Snooze infers the result type from the #:from clause: