Thread: SQL pre-processor, like ecpg, for other languages?

SQL pre-processor, like ecpg, for other languages?

From
John McKown
Date:
PostgreSQL comes with ecpg which is a "pre-processor" to handle embedded EXEC SQL startements in C (OK, you already know that). I am wondering if anyone knows of any such program for other compiled languages, in particular GNU COBOL or ADA? (please don't shudder, I have my reasons as strange as they may be). If not, I may try to "hack" up something using ecpg as a model. But I'm not confident that I have the talent / knowledge / experience to be able to do that.

Thanks.

--

Schrodinger's backup: The condition of any backup is unknown until a restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

Re: SQL pre-processor, like ecpg, for other languages?

From
Reid Thompson
Date:
On Tue, 2015-08-11 at 07:20 -0500, John McKown wrote:

> PostgreSQL comes with ecpg which is a "pre-processor" to handle embedded EXEC
> SQL startements in C (OK, you already know that). I am wondering if anyone
> knows of any such program for other compiled languages, in particular GNU
> COBOL or ADA? (please don't shudder,
https://www.google.com/search?q=gnu+cobol+embeded+sql&ie=utf-8&oe=utf-8

5.4   Does GnuCOBOL support any SQL databases?

Yes. There are embedded SQL engines for GnuCOBOL and PostgreSQL, Oracle, and
Firebird. There has also been efforts made for accessing DB2.
http://opencobol.add1tocobol.com/gnucobol/#does-gnucobol-support-any-sql-databases

Re: SQL pre-processor, like ecpg, for other languages?

From
Reid Thompson
Date:
On Tue, 2015-08-11 at 14:32 -0400, an unknown sender wrote:

> On Tue, 2015-08-11 at 07:20 -0500, John McKown wrote:
> 

> > PostgreSQL comes with ecpg which is a "pre-processor" to handle embedded
> > EXEC
> > SQL startements in C (OK, you already know that). I am wondering if anyone
> > knows of any such program for other compiled languages, in particular GNU
> > COBOL or ADA? (please don't shudder,
> https://www.google.com/search?q=gnu+cobol+embeded+sql&ie=utf-8&oe=utf-8
> 
> 5.4   Does GnuCOBOL support any SQL databases?
> 
> Yes. There are embedded SQL engines for GnuCOBOL and PostgreSQL, Oracle, and
> Firebird. There has also been efforts made for accessing DB2.
> http://opencobol.add1tocobol.com/gnucobol/#does-gnucobol-support-any-sql
> -databases

see
http://opencobol.add1tocobol.com/gnucobol/#id974
look at the links to the right, under section 5.4

Re: SQL pre-processor, like ecpg, for other languages?

From
John McKown
Date:
My thanks. I didn't think to look at OpenCOBOL, just GNU and just couldn't seem to find anything.

​I'm downloading the FireBird code now to see how they did it. I didn't do very well in the "Compiler Theory" class in college. I'm a tad better now, but not even a novice really. ​


--

Schrodinger's backup: The condition of any backup is unknown until a restore is attempted.

Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown