On Nov 30, 2007 11:39 PM, Hans-Christoph Steiner hans@eds.org wrote:
If you use a selector for every message into this object, then you can get rid of the "sqlite" prefix, and it would be very natural for people used to Pd. For example:
[open $1( [close( [export $1( - this could be used to export the database to a .sql file
This is doable...
Instead of commas, you could reuse the same message used for message boxes
[addcomma(. Plus [tkwidgets/text] (its in Pd-extended now) will allow you to type commas and have them sent in messages, but they'll be escaped. Here's an example combined the syntax of [textfile] and message boxes:
[clear ( [add insert into mytable (name ( [addcomma ( [add id ( [addcomma ( [add data) values ('$1' ( [addcomma ( [add $2 ( [addcomma ( [add $3) ( [submit (
It's not pretty, but it follows Pd-style messages and it would work.
At the same time, doing it in the fashion we are now would make it more SQL-like. While I understand the idea of doing things in a PD-like way, taking it too far, and mangling the SQL might make the object almost unfriendly, if not downright unusable. Trying to keep the SQL as close to the real syntax, I think is very important.
It would be nice to hear from others on this topic. Anyone?
Mike