Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 39EAC200B27 for ; Wed, 22 Jun 2016 19:37:04 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 38550160A36; Wed, 22 Jun 2016 17:37:04 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7FA55160A24 for ; Wed, 22 Jun 2016 19:37:03 +0200 (CEST) Received: (qmail 56164 invoked by uid 500); 22 Jun 2016 17:37:02 -0000 Mailing-List: contact users-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@groovy.apache.org Delivered-To: mailing list users@groovy.apache.org Received: (qmail 56154 invoked by uid 99); 22 Jun 2016 17:37:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Jun 2016 17:37:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1D6831A0B02 for ; Wed, 22 Jun 2016 17:37:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.179 X-Spam-Level: * X-Spam-Status: No, score=1.179 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 8co-8ka3je18 for ; Wed, 22 Jun 2016 17:37:00 +0000 (UTC) Received: from mail-vk0-f54.google.com (mail-vk0-f54.google.com [209.85.213.54]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id A229E5F3FC for ; Wed, 22 Jun 2016 17:36:59 +0000 (UTC) Received: by mail-vk0-f54.google.com with SMTP id d185so71728128vkg.0 for ; Wed, 22 Jun 2016 10:36:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=yb5j+N/EMHwIn5+r5eM5crs0blU5hM0iL3lh7IWfxHo=; b=nWSI4DxRcDT6vaTkIVlziUtA6RcNa+4mgatnMoqXOvZCcf0LAOa55U2HH5WdFIFp+n 8V3QgK4EP0XXQElv/L3JpY3tqOBLtO5ft2++fjc+Wkrg3xFdlJqhM7eD49F7giz8SQbd 8djM+wEmydyxW/+435Hrz56tH3LapYMWSyk8fprdS22Aacq6yzsgQW2mn7mZKTAvfFRI gY1QkQu+Fn8S38Va/M+ci5u/cH6T+P3pG8lgSjQ7lfUZr5yAt2iAd3/noU5rEB0CeMdM 05swIKkdlU6GKXUx5GygAi0C3dp5cEzO6KGjrnbW7qN+rd5k38r8kjXVF+00wZfHYNrR kPpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=yb5j+N/EMHwIn5+r5eM5crs0blU5hM0iL3lh7IWfxHo=; b=fiF5KWwAY2Fzxt/SRaAW1OAavlwD/5+PKh4J8eFKTnUokXLXg6tv48SxD0vzrSZCwa Sk6TN6FvfCGU8VIyHUIizVuT4qKx7XJJqJFUJXYiUqFC/J5KSWLm1isSkAh10yglZc+a TdREutKfpprTTyztViSnP28kRNm9B2JHeiyaYYYRbP7Ez3iBSPqDGoUG8FIdNJXjT0V9 2GWTbqIvVnNAXRkktZDqdeeVWSz8hUrysYuukCg22OSSyc+0/KWrfNxR364J1h00DZYK y5tYDPYYqeIlEwFLtZY1UViZaNAtrumPXCBk9yKcEXe/UfAJh8tvQP1XQkoBP2/iiTE5 olvg== X-Gm-Message-State: ALyK8tJ2N7AVUpwZl4nxte7LsnMMlJNLdrpAB8C1AP4j0Qq8ZEpmcVwwGP+E8kSaT8YS/IZyXKmqgz6iJnp/yQ== X-Received: by 10.176.65.3 with SMTP id j3mr12898435uad.62.1466617017506; Wed, 22 Jun 2016 10:36:57 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.3.120 with HTTP; Wed, 22 Jun 2016 10:36:57 -0700 (PDT) From: Wilson MacGyver Date: Wed, 22 Jun 2016 13:36:57 -0400 Message-ID: Subject: @compileStatic and groovy.sql To: users@groovy.apache.org Content-Type: multipart/alternative; boundary=94eb2c1242ce59a32a0535e162c3 archived-at: Wed, 22 Jun 2016 17:37:04 -0000 --94eb2c1242ce59a32a0535e162c3 Content-Type: text/plain; charset=UTF-8 Hi, If I want to use compileStatic with groovy.sql, how would I do that? the problem as far as I can tell is sql.eachRow("select id,.... from whatever") { foo -> ... foo.id } returns data that is known at runtime but at compile time. there is no way to know that the SQL statement returns a id column. is there a way to do it? Thanks, Mac -- Omnem crede diem tibi diluxisse supremum. --94eb2c1242ce59a32a0535e162c3 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi,

If I want to use compileStatic with= groovy.sql, how would I do that?


t= he problem as far as I can tell is

sql.eachRow(&qu= ot;select id,.... from whatever") { foo ->=C2=A0
...
=C2=A0 foo.id
}
returns data that is known at runtime

= but at compile time. there is no way to know that the SQL statement returns= a
id column.

is there a way to do it?

Thanks,
Mac

-- <= br>
Omnem = crede diem tibi diluxisse supremum.
--94eb2c1242ce59a32a0535e162c3--