Common SQL uses the MySQL mechanism that returns values as strings.
By default, Common SQL converts these strings to the appropriate Lisp type corresponding to the column type (or more accurately, the type of the field in the query) according to MySQL type mapping
However, if you specify the result type as
, this eliminates the conversion and the return value is simply the string retrieved by MySQL. For information about specifying the result type for a column (or multiple columns) in a query, see Querying.
Each of the five date-like types (that is, Date, Datetime, Timestamp, Time and Year) can have result type
with the following effects:
This result type means a Universal time. This is the default except for Year.
A string with the format that MySQL uses for Date columns.
A string with the format that MySQL uses for Datetime columns.
All the numeric types can have result type
, causing the appropriate conversion. No check is made on whether the result is actually useful.
String types can have result type
, which returns an array.