~ubuntu-branches/ubuntu/oneiric/gnat-gps/oneiric

« back to all changes in this revision

Viewing changes to gnatlib/src/postgres/gnatcoll-sql-postgres.adb

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-18 12:35:49 UTC
  • mfrom: (10.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080818123549-dp25qi8lg9f0x14t
Tags: 4.3~2008.08.09ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-----------------------------------------------------------------------
 
2
--                               G N A T C O L L                     --
 
3
--                                                                   --
 
4
--                 Copyright (C) 2005-2008, AdaCore                  --
 
5
--                                                                   --
 
6
-- GPS is free  software;  you can redistribute it and/or modify  it --
 
7
-- under the terms of the GNU General Public License as published by --
 
8
-- the Free Software Foundation; either version 2 of the License, or --
 
9
-- (at your option) any later version.                               --
 
10
--                                                                   --
 
11
-- This program is  distributed in the hope that it will be  useful, --
 
12
-- but  WITHOUT ANY WARRANTY;  without even the  implied warranty of --
 
13
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --
 
14
-- General Public License for more details. You should have received --
 
15
-- a copy of the GNU General Public License along with this program; --
 
16
-- if not,  write to the  Free Software Foundation, Inc.,  59 Temple --
 
17
-- Place - Suite 330, Boston, MA 02111-1307, USA.                    --
 
18
-----------------------------------------------------------------------
 
19
 
 
20
with GNATCOLL.SQL.Postgres.Builder;
 
21
 
 
22
package body GNATCOLL.SQL.Postgres is
 
23
 
 
24
   N_OID : aliased constant String := "OID";
 
25
 
 
26
   -------------------------------
 
27
   -- Build_Postgres_Connection --
 
28
   -------------------------------
 
29
 
 
30
   function Build_Postgres_Connection return Database_Connection is
 
31
   begin
 
32
      return GNATCOLL.SQL.Postgres.Builder.Build_Postgres_Connection;
 
33
   end Build_Postgres_Connection;
 
34
 
 
35
   ---------------
 
36
   -- OID_Field --
 
37
   ---------------
 
38
 
 
39
   function OID_Field (Table : SQL_Table'Class) return SQL_Field_Integer is
 
40
   begin
 
41
      return SQL_Field_Integer'
 
42
        (Table    => Table.Table_Name,
 
43
         Instance => Table.Instance,
 
44
         Name     => N_OID'Access);
 
45
   end OID_Field;
 
46
 
 
47
end GNATCOLL.SQL.Postgres;