comp.lang.ada
 help / color / mirror / Atom feed
* PostgreSQL Ada95 Binding APQ 1.0 Released
@ 2002-08-03 15:30 Warren W. Gay VE3WWG
  2002-08-03 22:14 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Warren W. Gay VE3WWG @ 2002-08-03 15:30 UTC (permalink / raw)


The APQ 1.0 Ada95 binding for PostgreSQL is a very easy to use
binding for SQL interactions with the database. This binding uses
the C language libpq library and does NOT require ODBC software.
This makes PostgreSQL available to Ada95 programmers with the
minimum of software prerequesites.

The following features are provided:

- it is a thick binding (for a natural Ada95 experience)
- it is very simple to use: only 3 objects to know
   - Connection_Type
   - Query_Type
   - Blob_Type
- support for strong Ada95 data types
- generic function and procedure support
- full NULL indicator support
- full BLOB support
- Ada95 stream I/O for blobs
- Additional DATE, TIME and TIMESTAMP support routines
- ACL License (Ada Community License)
- Experimental Decimal child package support
- 100+ page reference manual
   - almost every function has an example
- no embedded SQL precompiler needed

The following were APQ design goals:

- very simple to use (#1 priority)
- easy to read both SQL and Ada code
- reliable (exceptions for error conditions)
- strong blob support
- no C language interfaces or types ;-)
- easy to install (no ODBC! Requires only Postgres libpq)
- easy to debug (To_String on Query_Type for example
   returns the full SQL text used)

Tested and developed on FreeBSD 4.4, using GNAT 3.13p. While
untested for Linux, it should install OK on modern Linux
platforms. It should port well to other UNIX platforms as
well.

Here is an abbreviated sample of what a query looks like
using the APQ binding (using weak data types for brevity):

declare
    C : Connection_Type;
    Q : Query_Type;
begin
    Connect(C);                  -- Using environment variables here
    Prepare(Q,    "SELECT CUST_NO,CUST_NAME,BIRTHDAY");
    Append_Line(Q,"FROM CUSTOMER");
    Execute(Q,C);
    while not End_of_Query(Q) loop
       Fetch(Q);
       declare
          procedure Value is new Date_Fetch(PG_Date,Boolean);
          Cust_No :    PG_Integer := Value(Q,1);
          Cust_Name :  String     := Value(Q,2);
          Birthday :   PG_DATE;  -- Date of birth
          i_Birthday : Boolean;  -- NULL indicator for Birthday
       begin
          Value(Q,3,Birthday,i_Birthday);
          ...                    -- Process row results
       end;
    end loop;
end;         -- Finalization of Q and C closes and disconnects

You can download the source+manual, or just the PDF manual
alone from http://home.cogeco.ca/~ve3wwg .

Enjoy, Warren.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PostgreSQL Ada95 Binding APQ 1.0 Released
  2002-08-03 15:30 PostgreSQL Ada95 Binding APQ 1.0 Released Warren W. Gay VE3WWG
@ 2002-08-03 22:14 ` Florian Weimer
  2002-08-04 20:13   ` Björn Lundin
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2002-08-03 22:14 UTC (permalink / raw)


"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:

> - ACL License (Ada Community License)

Can you dual-license it under the ACL and GPL?



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PostgreSQL Ada95 Binding APQ 1.0 Released
  2002-08-03 22:14 ` Florian Weimer
@ 2002-08-04 20:13   ` Björn Lundin
  2002-08-05  0:50     ` PostgreSQL Ada95 Binding APQ 1.0 Released (now 1.1) Warren W. Gay VE3WWG
  0 siblings, 1 reply; 4+ messages in thread
From: Björn Lundin @ 2002-08-04 20:13 UTC (permalink / raw)


Florian Weimer wrote:

> "Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:
> 
>> - ACL License (Ada Community License)
> 
> Can you dual-license it under the ACL and GPL?


There is a free (BSD -license) package similar, but simpler
at http://home.swipnet.se/lundin/ada_95_tools.html

/Bj�rn



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: PostgreSQL Ada95 Binding APQ 1.0 Released (now 1.1)
  2002-08-04 20:13   ` Björn Lundin
@ 2002-08-05  0:50     ` Warren W. Gay VE3WWG
  0 siblings, 0 replies; 4+ messages in thread
From: Warren W. Gay VE3WWG @ 2002-08-05  0:50 UTC (permalink / raw)


Bj�rn Lundin wrote:
> Florian Weimer wrote:
>>"Warren W. Gay VE3WWG" <ve3wwg@cogeco.ca> writes:
>>>
>>>- ACL License (Ada Community License)
>>
>>Can you dual-license it under the ACL and GPL?
> 
> There is a free (BSD -license) package similar, but simpler
> at http://home.swipnet.se/lundin/ada_95_tools.html
> 
> /Bj�rn

I have re-released APQ as version 1.1, with changes that
licenses it under a dual-license as Florian suggested
above.

Please find the changes in the manual and source code,
found at:

    http://home.cogeco.ca/~ve3wwg

The user/distributor can choose either the ACL or GPL
license. Apparently the ACL can be somewhat restrictive
for the distributor of the source code.

Enjoy, Warren.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-08-05  0:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-03 15:30 PostgreSQL Ada95 Binding APQ 1.0 Released Warren W. Gay VE3WWG
2002-08-03 22:14 ` Florian Weimer
2002-08-04 20:13   ` Björn Lundin
2002-08-05  0:50     ` PostgreSQL Ada95 Binding APQ 1.0 Released (now 1.1) Warren W. Gay VE3WWG

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