Return-Path: Delivered-To: apmail-incubator-empire-db-dev-archive@minotaur.apache.org Received: (qmail 57322 invoked from network); 7 Jan 2010 17:08:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Jan 2010 17:08:42 -0000 Received: (qmail 30655 invoked by uid 500); 7 Jan 2010 17:08:42 -0000 Delivered-To: apmail-incubator-empire-db-dev-archive@incubator.apache.org Received: (qmail 30625 invoked by uid 500); 7 Jan 2010 17:08:42 -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 30615 invoked by uid 99); 7 Jan 2010 17:08:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 17:08:42 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [88.79.172.157] (HELO mail.esteam.de) (88.79.172.157) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2010 17:08:33 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: re: view generation support in codegen Content-class: urn:content-classes:message X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Thu, 7 Jan 2010 18:08:10 +0100 Message-ID: In-Reply-To: <4B45388D.4050704@arcor.de> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: re: view generation support in codegen Thread-Index: AcqPOJl8Io4vBRouT3O8ndxQNfI9DgAglSQg References: <4B45388D.4050704@arcor.de> From: =?iso-8859-1?Q?Rainer_D=F6bele?= To: Hi Benni, great to hear from you. I don't think it is necessary to retrieve the command for a view. Implementing the createCommand on a view class in only necessary for = creating a database. And we want to go the other way. Besides the createCommand requires a DBCommand object and hence you = would need a SQL parser that turns a SQL statement into a command = object. While this would be possible for simple statements, making it = work for all kind of statements could be a too hard nut to crack. Regards, Rainer Benjamin Venditti wrote: > re: view generation support in codegen >=20 > Hi there, >=20 > i am glad to announce that I've become a committer to empire-db and = i'm > looking forward to work with the empire-db team. > With this announcement i also submitted my first commit in svn. Here = is > a overview of my changes: >=20 > - new feature: it is now possible to generate views, however they are > not fully functional as the function "createCommand" is not = implemented > - bugfix: column names with whitespaces caused the generator to create > uncompilable classes (status: fixed) > - added mysql dependency in pom.xml > - added new configuration options in config.xml > "viewClassSuffix", "tablePackageName", "recordPackageName", > "viewPackageName" >=20 > I tested my changes with MySQL and its sample database "sakila" > (http://dev.mysql.com/doc/sakila/en/sakila.html). >=20 > Does anyone know if there is a way to retrieve the SQL commands for = the > views of a database that it holds? >=20 > Best regards, > Benjamin