prepared statement API proposal

Cyrus Harmon <ch-clsql-dl6SmSK5uza1Z/[email protected]>
Newsgroups gmane.lisp.clsql.devel
Message-ID <[email protected]>
Dear clsql-devel,

I'd like to be able to issue queries that return binary results. 
Clearly, one way to do this is to return everything as properly escaped 
text and convert to binary data and stuff it in a vector. I'd like to 
do better than this, however, especially for prepared statements. 
Postgresql has an option to return the results of prepared queries as 
binary data and I'd like to be able to use this in clsql. The question 
is where best to put this? Currently, I switch to binary results if I 
know I'm getting back a blob. This is nice, but if I want to avoid 
specifying result types and just have everything be :auto, I won't know 
the return types until after I run the query. It would be nice if this 
all "just worked" and if I didn't specify any time info, I'd get back 
strings for strings, numbers for numbers, arrays/vectors for blobs, 
etc... I'd like to add a keyword parameter to run-prepared-sql to 
retrieve rows as binary and I'd probably also need to add a keyword to 
database-run-prepared and maybe database-query. Does this sound 
reasonable?

Thanks,

Cyrus
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.