Re: database-output-sql(-as-type)

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Matthew Danish wrote:
> Why is there both database-output-sql and database-output-sql-as-type?

The two functions are used in different aspects of creating SQL
strings. 

database-output-sql-as-type is a higher level function that is
specialized by database type to output a data value for a OODML data
type (as type clsql:generalized-boolean) and prepare that as a string
for output via a SQL statement. 

database-output-sql is a lower level function used in the generation
of SQL expressions. Some of the parts of that expression may be values
calculated by database-sql-as-type.

As an example of their differences, database-output-sql-as-type for a
string just returns that same string. Whereas, database-output-sql
handles the escaping of quotation and backslash characters for that
string.

-- 
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.