SQLTemplate does support multiples sets of parameters (batching) for
the same template. So in this respect it is a superset of
InsertBatchQuery. Don't remember if it does the right JDBC batch thing
in the backend though (but that would be a different Jira)
Andrus
On Jan 13, 2010, at 5:17 PM, Evgeny Ryabitskiy wrote:
> Actually I am really missing for nice Batch support when I have to do
> mass insert in some table.
> There was some issue to move data between databases (from MS SQL to
> Oracle).
>
> Chain is slow when you are moving huge tables.
>
> For now I am using InsertBatchQuery but is little bit painful :(
> InsertBatchQuery oriented for internal use and requires DbEntity to
> be instantiated. So I am loading DB meta data to form DbEntity (like
> our reverse engineering is working) .
>
> maybe we could do such embedded feature? Make InsertBatchQuery as API
> (external) add there DbEntity reverse loading (and DbEntity caching).
> it should be very useful!
>
> Evgeny.
>
>
>
> 2010/1/13 Andrus Adamchik (JIRA) <jir..pache.org>:
>>
>> [ https://issues.apache.org/jira/browse/CAY-304?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
>> ]
>>
>> Andrus Adamchik closed CAY-304.
>> -------------------------------
>>
>> Resolution: Won't Fix
>>
>> the closest analog is querychain, although it uses separate
>> preparedstatements
>>
>>> SQLTemplates and Batches Support
>>> --------------------------------
>>>
>>> Key: CAY-304
>>> URL: https://issues.apache.org/jira/browse/CAY-304
>>> Project: Cayenne
>>> Issue Type: Improvement
>>> Components: Core Library
>>> Affects Versions: 1.2 branch
>>> Reporter: Andrus Adamchik
>>> Assignee: Andrus Adamchik
>>> Priority: Minor
>>> Fix For: Undefined future
>>>
>>>
>>> I was just doing some testing with OpenBase and one annoying thing
>>> was the lack of batch support in SQLTemplate. Each SQLTemplate
>>> corresponds to a single JDBC statement, and those expect just one
>>> command...
>>> I suggest having another Velocity directive (say "#go") that will
>>> separate individual statements in the template. This way we can
>>> build (sort of) db-independent batches. Scheduling this for 1.2
>>> Also this feature should make preparation of DB for unit testing
>>> MUCH simpler.
>>
>> --
>> This message is automatically generated by JIRA.
>> -
>> You can reply to this email to add a comment to the issue online.
>>
>>
>
This archive was generated by hypermail 2.0.0 : Wed Jan 13 2010 - 10:23:54 EST