Return-Path: X-Original-To: apmail-cayenne-dev-archive@www.apache.org Delivered-To: apmail-cayenne-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 971A6CB28 for ; Mon, 26 Jan 2015 11:27:21 +0000 (UTC) Received: (qmail 9506 invoked by uid 500); 26 Jan 2015 11:27:21 -0000 Delivered-To: apmail-cayenne-dev-archive@cayenne.apache.org Received: (qmail 9482 invoked by uid 500); 26 Jan 2015 11:27:21 -0000 Mailing-List: contact dev-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list dev@cayenne.apache.org Received: (qmail 9471 invoked by uid 99); 26 Jan 2015 11:27:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2015 11:27:21 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [162.242.166.79] (HELO us-rs09.objectstyle.com) (162.242.166.79) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 26 Jan 2015 11:27:17 +0000 Received: (qmail 27565 invoked by uid 509); 26 Jan 2015 11:26:55 -0000 Received: from localhost (HELO ?IPv6:::1?) (127.0.0.1) by us-rs09.objectstyle.com with SMTP; 26 Jan 2015 11:26:55 -0000 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: SQLExec query From: Andrus Adamchik In-Reply-To: <54C58DC1.8080701@maniatis.org> Date: Mon, 26 Jan 2015 06:26:57 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <94CB7084-FF82-4404-B62B-FADBDA4F7B59@objectstyle.org> <54C58DC1.8080701@maniatis.org> To: dev@cayenne.apache.org X-Mailer: Apple Mail (2.1993) X-Virus-Checked: Checked by ClamAV on apache.org > On Jan 25, 2015, at 7:43 PM, Aristedes Maniatis = wrote: >=20 > List execute(Query) >=20 > 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/jav= a/org/apache/cayenne/QueryResult.java > If these are to mirror the select api, should they look like >=20 > 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=