I will be giving a talk on my SQL generation library called DBIx::PreQL.<br><br>DBIx::PreQL - Less awful SQL generation with templates<br><br>Executive Summary:<div><br></div><div>    Do amazing things with SQL by sprinkling it with 7 characters: & | * # ? ! ~<br>
<br>Summary:<br><br>Nearly every programmer will work with relational databases at one time or another, if not every day.  This means we have to work with SQL, whether we write our queries by hand or use an abstraction layer to generate them.<br>
<br>No generator is perfect, and sometimes you just have to write SQL to get the results you need.<br><br>DBIx::PreQL defines a small templating language that is designed to make it easy to manage groups of related, complex queries.  <br>
<br>For example, if you have a webpage that sells widgets, you may have a bunch of nearly identical queries that provide:<br><br>* A list of available models of widget<br>* A count of available models of widget<br>* A count of widgets available of each type<br>
* The above three queries for discontinued models only.<br>* The first three queries for currently available models only.<br><br>These queries are probably 90% identical, with only minor changes.<br><br>DBIx::PreQL addresses this problem by adding simple tags to the beginning of each line of SQL that are used to determine whether or not a line is included in the final query.<br>
<br>Here's a typical marked-up query:<div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div><font face="courier new, monospace">*  SELECT</font></div><div><font face="courier new, monospace">&    count(*) !count!</font></div>
<div><font face="courier new, monospace">*    model,   </font></div><div><font face="courier new, monospace">*    name,</font></div><div><font face="courier new, monospace">&    status   !~status!</font></div><div><font face="courier new, monospace">*  FROM tbl_widget</font></div>
<div><font face="courier new, monospace">*  WHERE</font></div><div><font face="courier new, monospace">&    status = ?status?</font></div><div><font face="courier new, monospace">&    AND model = ?model?</font></div>
<div><div><font face="courier new, monospace">&    AND name LIKE ?name?</font></div></div></blockquote><div><div><br></div><div><br></div><div>You can see DBIx::PreQL on github right now: <a href="https://github.com/daotoad/DBIx-PreQL">https://github.com/daotoad/DBIx-PreQL</a>  <br>
I will be working like a feverish weasel tonight to get it uploaded to CPAN before the talk. <br><br><br><br>On Mon, Sep 17, 2012 at 3:23 PM, Webster <<a href="mailto:webstermontego@gmail.com">webstermontego@gmail.com</a>> wrote:<br>
> There were some mentionings of a couple people that might be willing to give a talk tomorrow but I never heard anything definite. Is anyone willing to volunteer for tomorrow?<br>> _____________________________________________________________<br>
> Seattle Perl Users Group Mailing List<br>>      POST TO: <a href="mailto:spug-list@pm.org">spug-list@pm.org</a><br>> SUBSCRIPTION: <a href="http://mail.pm.org/mailman/listinfo/spug-list">http://mail.pm.org/mailman/listinfo/spug-list</a><br>
>     MEETINGS: 3rd Tuesdays<br>>     WEB PAGE: <a href="http://seattleperl.org/">http://seattleperl.org/</a><br><br></div></div></div>