<div dir="ltr">On Tue, Apr 2, 2013 at 5:29 PM, Dmitry Kolesnikov <span dir="ltr"><<a href="mailto:dmkolesnikov@gmail.com" target="_blank">dmkolesnikov@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi,<div><br></div><div>I've made Erlang port of whiskers.js template library</div>
<div><a href="https://github.com/fogfish/swirl" target="_blank">https://github.com/fogfish/swirl</a></div><div><br></div><div>as a side effect is become a client-side SQL query template builder, which I've started to use for my project.</div>
<div><br></div><div>Here is a small example:</div><div><div><br></div><div>swirl:c(mysql, "SELECT * FROM Users WHERE id={id}").</div><div>mysql:render([{id, "xxx"}]).</div><div>"SELECT * FROM Users WHERE id=xxx"</div>
</div></div></blockquote><div><br></div><div style>This is an interesting approach but not exactly what I am looking for. </div><div style>I am searching for an alternative to writing raw queries in code.<br></div><div style>
<br></div><div style>I have one idea ie. to express the query may be using tuples and lists. and have a</div><div style>set of functions transform it to sql. Not sure if this will make things more complicated</div><div style>
though :-) but it's just an idea.</div><div style><br></div><div style>Thanks,</div><div style>vineet</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word"><div><div><br></div><div>- Dmitry </div></div><div><br></div><div><br><div><div><div class="h5"><div>On Apr 2, 2013, at 2:47 PM, Vineet Naik <<a href="mailto:naikvin@gmail.com" target="_blank">naikvin@gmail.com</a>> wrote:</div>
<br></div></div><blockquote type="cite"><div><div class="h5"><div dir="ltr">Hi, <div><br></div><div>Is there a mysql query builder library for Erlang? On some searching, </div><div>I came across boss_db[1] which is an ORM. While I am open to ORMs and </div>
<div>planning to give it a try, I would prefer a simple query builder</div>
<div><br></div><div>[1]: <a href="https://github.com/evanmiller/boss_db" target="_blank">https://github.com/evanmiller/boss_db</a></div><div><br></div><div>Regards,<br></div><div>Vineet<br>
</div></div></div></div>
_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br><a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div></div></blockquote></div><br>
</div></div>