Return-Path: X-Original-To: apmail-db-torque-dev-archive@www.apache.org Delivered-To: apmail-db-torque-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 C264710277 for ; Sun, 5 May 2013 13:11:58 +0000 (UTC) Received: (qmail 91187 invoked by uid 500); 5 May 2013 13:11:58 -0000 Delivered-To: apmail-db-torque-dev-archive@db.apache.org Received: (qmail 91102 invoked by uid 500); 5 May 2013 13:11:57 -0000 Mailing-List: contact torque-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Apache Torque Developers List" Reply-To: "Apache Torque Developers List" Delivered-To: mailing list torque-dev@db.apache.org Received: (qmail 91078 invoked by uid 99); 5 May 2013 13:11:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2013 13:11:57 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [217.24.207.26] (HELO mail.seitenbau.net) (217.24.207.26) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 May 2013 13:11:52 +0000 Received: from www.seitenbau.net ([192.168.15.18]:6228) by mail.seitenbau.net with esmtp (Exim 4.76) (envelope-from ) id 1UYyir-0001tj-2M for torque-dev@db.apache.org; Sun, 05 May 2013 15:11:25 +0200 X-CTCH-RefID: str=0001.0A0C0205.51865A7D.00EC,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0 Subject: groovy support in generator & typed model in templates X-KeepSent: 7906058E:9F07F359-C1257B62:00476EB5; type=4; name=$KeepSent To: torque-dev@db.apache.org X-Mailer: Lotus Notes Release 8.5.3 September 15, 2011 Message-ID: From: Thomas Fox Date: Sun, 5 May 2013 15:11:25 +0200 X-MIMETrack: Serialize by Router on www/seitenbau(Release 8.5HF467 | May 15, 2009) at 05/05/2013 15:11:25 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org The groovy support in the generator is now finished. There are 2 supported groovy template types: groovy scripts and groovy templates. A script returns the result string as a return value. A template returns the text of the template files, one can use dynamic parts in it. See http://groovy.codehaus.org/Groovy+Templates for details. Unfortunately, the eclipse groovy plugin only supports groovy scripts, so I'd personally rather not use the template variant. As an example I have changed the sql generation from velocity to groovy, using the script variant and a typed model. Please have a look and check whether this is better to edit/understand than the velocity templates (in my opinion, due to the typed model and editor support, yes). Please use the eclipse groovy plugin for viewing the cripts as it provides conciderable value (sytax highlighting, code completion...) A small problem is the long startup time of the groovy script engine, ca. 1 sec on my machine, but this is needed only once per generation run. Then the decision would be whether for the templates, we want to switch back to velocity, switch over to groovy, or leave the current status (part groovy, part velocity) I'll be in holiday in two days for over a week, so there is no need to hurry. Thomas --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org For additional commands, e-mail: torque-dev-help@db.apache.org