[erlang-questions] [ANN] mekao - SQL constructor library

Daniil Churikov ddosia@REDACTED
Mon Jan 13 11:57:40 CET 2014


I saw this library when I was looking for solutions of my problem. This 
library have different approach:
although you use records to define your query, you should write a query but 
in terms of internal DSL (i.e. {insert,project,[{foo,5},{baz,"bob"}]}).


You still need to keep somewhere a table name "project", you need to serialize, say,
your record to proplist where name of fields should be the same as columns in DB. Otherwise you need
to maintain fields to columns translation as well.


mekao comparable to sqerl provides more high-level abstractions, but, I 
suppose, not such flexible (b/c theoretically we could
completely cover all SQL with internal sqerl's DSL, but then why I need to 
use this library if I could write plain SQL?).

Jesper Louis Andersen wrote:

>
> On Sun, Jan 12, 2014 at 2:47 PM, Daniil Churikov <ddo...@REDACTED<javascript:>
> > wrote:
>
>> I would like to announce small library (currently under 500LoC), which 
>> intended to help in SQL queries construction.
>> The main goal is to cover very basic type of queries, and provide 
>> mechanism to easily extend it if needed.
>> Note that as one of the key concept is that you use records as db-data 
>> representation, otherwise it may not be useful for you.
>>
>
> There is an older library which does something in the same vein:
>
> https://github.com/devinus/sqerl
>
>
> -- 
> J. 
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140113/573be8b9/attachment.htm>


More information about the erlang-questions mailing list