[PD] SQL wrappers

Hans-Christoph Steiner hans at eds.org
Mon Dec 10 21:29:44 CET 2007


I was just doing some research on SQL placeholders and I got an idea  
from this Python library for SQL:

http://www.aminus.net/geniusql/wiki/SQLInjection

Basically, if there are standard SQL interfaces to the various SQL  
database objects, then we can make some support objects that generate  
SQL queries from inlets.  I can't really think of a way to make this  
very flexible off the top of my head, but I wanted to throw it out  
there.

Then there could also be an object like Matju describes that you  
write the SQL in the object box as arguments, and it would  
automatically interpret the ? as placeholders and create inlets for  
them.  The inlets would either have to be symbol inlets (numbers can  
be symbols but strings can be floats) or proxy inlets.

[sql SELECT "ID" FROM "Animal" WHERE ("Animal"."Species" = 'Ape' or  
1=1 or '')]

This would have two outlets that are designed to plug right into the  
inlets that we have been describing.  There could also be a [expr]- 
style SQL object.  So I think the key thing is coming up with a core  
interface that makes it flexible and simple, and then it will be  
possible to make other wrapper interfaces.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqlwrappers.zip
Type: application/zip
Size: 1992 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20071210/71197c22/attachment.zip>
-------------- next part --------------

.hc

------------------------------------------------------------------------ 
----

Mistrust authority - promote decentralization.  - the hacker ethic




More information about the Pd-list mailing list