comp.lang.ada
 help / color / mirror / Atom feed
From: Emmanuel Briot <briot.emmanuel@gmail.com>
Subject: Re: GNATColl and support for PostgreSQL stored procedures and non-public schemas
Date: Fri, 4 Nov 2011 01:36:06 -0700 (PDT)
Date: 2011-11-04T01:36:06-07:00	[thread overview]
Message-ID: <2b03ec30-1ad6-425b-96e1-68b111bf0fe8@f29g2000yqa.googlegroups.com> (raw)
In-Reply-To: 4eb2ecda$0$290$14726298@news.sunsite.dk

> 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



      reply	other threads:[~2011-11-04  9:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 19:34 GNATColl and support for PostgreSQL stored procedures and non-public schemas Thomas Løcke
2011-11-04  8:36 ` Emmanuel Briot [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox