<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<br><div><div>On Dec 4, 2007, at 12:49 PM, Mike McGonagle wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><br><br><div class="gmail_quote">On Nov 30, 2007 11:39 PM, Hans-Christoph Steiner &lt;<a href="mailto:hans@eds.org">hans@eds.org</a>&gt; wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> <div style="word-wrap:break-word"><div><div><div>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: </div><div><br></div><div>[open $1(</div><div>[close(</div><div>[export $1(   - this could be used to export the database to a .sql file</div><div></div></div></div></div></blockquote><div><br class="webkit-block-placeholder"> </div><div>This is doable...</div><div><br class="webkit-block-placeholder"></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div> <div>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: <br></div><div><br></div><div>[clear (</div><div>[add insert into mytable (name (</div><div>[addcomma (</div><div>[add id (</div><div>[addcomma (</div><div>[add  data) values ('$1' (</div><div>[addcomma (</div><div> [add $2 (</div><div>[addcomma (</div><div>[add $3)  (</div><div>[submit (</div><div><div><br></div><div>It's not pretty, but it follows Pd-style messages and it would work.</div></div></div></div></blockquote><div><br class="webkit-block-placeholder"> </div><div>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. </div><div><br class="webkit-block-placeholder"></div><div>It would be nice to hear from others on this topic. Anyone?</div></div></blockquote><br></div><div>Ah, I get it, you are re-inserting the commas that Pd is interpreting based on their being a message that does not start with "sql" or "endsql"?  In that case, I think it makes sense to have a separate "sql" inlet.  I just have a strong aversion to having an atom at the end of the list cause the execution of something, in effect to act like the selector.  Pd's whole list handling is built around the idea that the selector is always the first element, and the rest are data.</div><div><br class="webkit-block-placeholder"></div><div>So the first, hot inlet could accept the "open", "close", "export", "clear", "add", and "submit" messages.  Then the right, cold inlet would just accept anything and append it onto the end of what's there.  This is also something of a violation of Pd's standards for interfaces, but I think a much less egregious one.</div><div><br class="webkit-block-placeholder"></div><div>Another possibility would be to have the submitsql message only cause a reaction if it was selector of the current message, but I think since this interpretation of the commas is non-standard, it would be best if it had its own inlet.</div><div><br class="webkit-block-placeholder"></div><div>.hc</div><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br style="font-family: Tahoma; "></div><div>----------------------------------------------------------------------------</div><div><br style="font-family: Tahoma; "></div><div>There is no way to peace, peace is the way.       -A.J. Muste</div><br class="Apple-interchange-newline"></span></span> </div><br></body></html>