Return-Path: X-Original-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C4C1D986D for ; Tue, 11 Oct 2011 07:40:19 +0000 (UTC) Received: (qmail 79664 invoked by uid 500); 11 Oct 2011 07:40:19 -0000 Delivered-To: apmail-incubator-empire-db-dev-archive@incubator.apache.org Received: (qmail 79618 invoked by uid 500); 11 Oct 2011 07:40:19 -0000 Mailing-List: contact empire-db-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: empire-db-dev@incubator.apache.org Delivered-To: mailing list empire-db-dev@incubator.apache.org Received: (qmail 79608 invoked by uid 99); 11 Oct 2011 07:40:17 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 07:40:17 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [87.118.96.127] (HELO mail.eknet.org) (87.118.96.127) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Oct 2011 07:40:10 +0000 Received: from localhost (unknown [212.55.210.130]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.eknet.org (Postfix) with ESMTPSA id 2F9F79D4091 for ; Tue, 11 Oct 2011 09:39:49 +0200 (CEST) Date: Tue, 11 Oct 2011 09:39:33 +0200 From: Eike Kettner To: empire-db-dev@incubator.apache.org Subject: Re: Work on EMPIREDB-103 (DDL duplicate code) almost complete! Message-ID: <20111011073933.GA3389@localhost> References: <20111009153616.767B023889E3@eris.apache.org> <20111010211948.GB6433@ithaka> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Debian GNU/Linux wheezy/sid (Kernel 3.0.0-1-686-pae) User-Agent: Mutt/1.5.21 (2010-09-15) X-Virus-Checked: Checked by ClamAV on apache.org I changed the SampleApp of examples-basic accordingly. The examples also were successfull with postgres 9.0.4 On [Mon, 10.10.2011 23:35], Francis De Brabandere wrote: > Sounds like I missed/misunderstood something there when I create the > driver. Go ahead and commit the change since it fixes a bug. (skipping > a column is not the correct solution anyway, should have thrown an > unsupportedexception or so) > > On Mon, Oct 10, 2011 at 11:19 PM, Eike Kettner wrote: > > Hi! > > > > I just ran the basic and advances examples on my linux machine with > > postgresql 8.4.8, mysql 5.1.49 and derby 10.4.2.0. > > > > All went well except for the basic example with postgresql. Here is the > > stack trace: > > > > org.apache.empire.exceptions.InvalidArgumentException: Invalid Argument -1 for parameter index. > > � � � �at org.apache.empire.db.DBReader.getValue(DBReader.java:370) > > � � � �at org.apache.empire.db.DBRecordData.getString(DBRecordData.java:193) > > � � � �at org.apache.empire.db.DBRecordData.getString(DBRecordData.java:206) > > � � � �at org.apache.empire.samples.db.SampleApp.queryRecords(SampleApp.java:419) > > � � � �at org.apache.empire.samples.db.SampleApp.main(SampleApp.java:135) > > > > > > The problem is line 422 of SampleApp.java, it says > > > > �reader.getString(PHONE_EXT_NUMBER) > > > > It seems that the query depends on the dbms. In line 380-386, the > > "column" PHONE_EXT_NUMBER is only added to the query if it's _not_ > > postgresql. The comment states, that this is due to posgresql not > > supporting substring. I'm pretty sure, that postgre supports this (see > > http://www.postgresql.org/docs/8.1/static/functions-string.html) So I > > bravely removed the if condition and the example ran successfully. > > > > Are there any other reasons for this if-condition? I'd then say, we > > should remove it, since substring is supported by postgre? > > > > Regards, > > Eike > > > > > > On [Mon, 10.10.2011 00:28], Rainer D�bele wrote: > >> Hi folks, > >> > >> I am happy to announce that I have almost completed another major task that has long been overdue: The reduction of duplicate code for DDL generation. > >> > >> Doesn't sound like much, but this issue has been quite a bit of work and hence took me quite a bit of time. > >> I have tried my best to achieve the same results as before by comparison of the DDL outcome. > >> But I have not been able to make real database tests against the following databases: MySQL, Postgre, H2, Derby. > >> However I have tested Oracle, SQLServer and HSQLDB. > >> > >> Is anyone able to test it with any of the remaining databases by running at least the basic and the advanced sample? > >> > >> Cheers, > >> Rainer > >> > > > > -- > > email: eike@eknet.org � https://www.eknet.org �pgp: 481161A0 > > > > > > -- > http://www.somatik.be > Microsoft gives you windows, Linux gives you the whole house. > -- email: eike@eknet.org https://www.eknet.org pgp: 481161A0