From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,2b652854118b67f9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.42.246.3 with SMTP id lw3mr15784944icb.0.1320400446550; Fri, 04 Nov 2011 02:54:06 -0700 (PDT) Path: p6ni69760pbn.0!nntp.google.com!news1.google.com!postnews.google.com!f29g2000yqa.googlegroups.com!not-for-mail From: Emmanuel Briot Newsgroups: comp.lang.ada Subject: Re: GNATColl and support for PostgreSQL stored procedures and non-public schemas Date: Fri, 4 Nov 2011 01:36:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: <2b03ec30-1ad6-425b-96e1-68b111bf0fe8@f29g2000yqa.googlegroups.com> References: <4eb2ecda$0$290$14726298@news.sunsite.dk> NNTP-Posting-Host: 194.98.77.125 Mime-Version: 1.0 X-Trace: posting.google.com 1320400446 21784 127.0.0.1 (4 Nov 2011 09:54:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 Nov 2011 09:54:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f29g2000yqa.googlegroups.com; posting-host=194.98.77.125; posting-account=6yLzewoAAABoisbSsCJH1SPMc9UrfXBH User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKUARELSC X-HTTP-UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1,gzip(gfe) Xref: news1.google.com comp.lang.ada:18825 Content-Type: text/plain; charset=ISO-8859-1 Date: 2011-11-04T01:36:06-07:00 List-Id: > Are there any plans for adding support for non-public schemas to the > gnatcoll_db2ada tool? Right now we have to resort to embedded SQL > instead of using the excellent GNATCOLL.SQL Ada style SQL interface. No such plan at this stage. Presumably, adding those should not be too difficult: in the text file, the name of the tables would be "schema.name". At this point, gnatcoll_db2ada needs to issue a "CREATE SCHEMA schema" command. The second part of it is to replace "." by some other substring for the Ada identifiers that are generated to represent the table. > And how about stored procedures? We use those A LOT in our application > but we haven't been able to figure out how to make use of them without > having to go back to plain old embedded SQL, which of course is sub- > optimal. For aggregate functions, you can simply define new constants similar to GNATCOLL.SQL.Func_Count. For other types of stored procedures, you could copy the implementation of GNATCOLL.SQL.Lower, for instance, and perhaps even make it more general so that it takes the name of the procedure in parameter. Emmanuel