> On Jan 25, 2015, at 7:43 PM, Aristedes Maniatis <a...@maniatis.org> wrote:
> 
>   List<QueryResult> execute(Query)
> 
> under what circumstances when this isn't a 'select' query will we get a list 
> of results?

This form is most generic - it can be a mix of multiple update counts and 
result lists. Mostly happens with stored procedures, but in theory can happen 
with some multi-statement arbitrary raw SQL:

https://github.com/andrus/cayenne/blob/sqlexec/cayenne-server/src/main/java/org/apache/cayenne/QueryResult.java

> If these are to mirror the select api, should they look like
> 
>   int[] update(Query)
>   int updateOne(Query)

Good point... I sorta wanted to highlight the batch aspect... But perhaps we 
don't even need an int[] variety and should expand batch counts into individual 
QueryResult's. Batch update is just a special case of "multi-part" query I 
guess.

Andrus

Reply via email to