Hello all,

Benedikt, you are right, all we need is a StringBuilder-Style query builder.
And  like Aderian said, we can suppor a default dialect, and allow
overriding. This is the mechanist used by iciql (www.iciql.com).
A problem will be faced is with support for properiatory (none-open
source) database. For example, if we don't have access to Oracle DB,
we can not perform the test.



On Wed, Jul 1, 2015 at 7:21 PM, Adrian Crum
<adrian.c...@sandglass-software.com> wrote:
> You can make the builder support generic SQL 2003, and provide a way to
> extend the builder with vendor-specific grammar.
>
> Adrian Crum
> Sandglass Software
> www.sandglass-software.com
>
>
> On 6/30/2015 11:10 PM, Benedikt Ritter wrote:
>>
>> Hello Mansour,
>>
>> 2015-06-30 23:57 GMT+02:00 Mansour Al Akeel <mansour.alak...@gmail.com>:
>>
>>> I am not sure if this is the right place to suggest this. Please let
>>> me know, before filling a Jira Ticket.
>>> I believe DbUtils has place for additional component:
>>>
>>> - A fluent API to generate SQL string:
>>>
>>> Developers find it difficult to concatenate strings to build a query.
>>> A fluent API makes it relatively easier, and keeps the query vendor
>>> independent.
>>> Some of the examples:
>>> * http://iciql.com/
>>> * http://jodd.org/doc/db/sqlgenerator.html
>>> * http://jdbi.org/
>>> * Jooq
>>> * https://mybatis.github.io/mybatis-3/statement-builders.html
>>>
>>> I am not talking about the mapping part. I am only suggesting
>>> generating the SQL string builder functionality. Something similar to
>>> MyBatis:
>>>
>>>    String sql = new SQL()
>>>      .INSERT_INTO("PERSON")
>>>      .VALUES("ID, FIRST_NAME", "${id}, ${firstName}")
>>>      .VALUES("LAST_NAME", "${lastName}")
>>>      .toString();
>>>
>>> I am wondering how much effort this can be, and most important if
>>> thers's interest in the community to create a separate independent
>>> component just for Sql String generation. MyBatis is under ASL 2.0
>>> license.
>>>
>>> Anyone else think there's a place in DBUtils for this functionaity ?
>>>
>>
>> That's kind of a domain specific StringBuilder for SQL, right?
>> How would you handle different data base dialects?
>>
>> Benedikt
>>
>>
>>>
>>> Thank you.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>>> For additional commands, e-mail: dev-h...@commons.apache.org
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to