11.4.4 Get columns from table
(m 'get table-name #:columns '(*) #:functions '() #:ret 'all #:group-by #f #:order-by #f)
- #:column is the columns list you wanted.
- #:functions is built-in functions calling, e.g:
#:functions '((count Persons.Lastname))
- #:ret specifies how to return the result, there’re three options:
- ’all for returning all results
- ’top for returning the first result
- integer (larger than 0), you specify the number.
- #:group-by used in conjunction with the aggregate functions to group the result-set by one or more columns.
- #:order-by used to sort the result-set by one or more columns.
For example, to get Lastname and City column, and return the first result.
(m 'get 'Persons #:columns '(Lastname City) #:ret 'top)