~ubuntu-branches/ubuntu/lucid/fpc/lucid-proposed

« back to all changes in this revision

Viewing changes to fpcsrc/packages/fcl-db/src/datadict/fpddpq.pp

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-10-09 23:29:00 UTC
  • mfrom: (4.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20081009232900-553f61m37jkp6upv
Tags: 2.2.2-4
[ Torsten Werner ]
* Update ABI version in fpc-depends automatically.
* Remove empty directories from binary package fpc-source.

[ Mazen Neifer ]
* Removed leading path when calling update-alternatives to remove a Linitian
  error.
* Fixed clean target.
* Improved description of packages. (Closes: #498882)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    This file is part of the Free Pascal run time library.
 
3
    Copyright (c) 2007 by Michael Van Canneyt, member of the
 
4
    Free Pascal development team
 
5
 
 
6
    Postgresql Data Dictionary Engine Implementation.
 
7
 
 
8
    See the file COPYING.FPC, included in this distribution,
 
9
    for details about the copyright.
 
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.
 
14
 
 
15
 **********************************************************************}
 
16
unit fpddpq;
 
17
 
 
18
{$mode objfpc}{$H+}
 
19
 
 
20
interface
 
21
 
 
22
uses
 
23
  Classes, SysUtils, sqldb, fpdatadict, fpddsqldb;
 
24
 
 
25
Type
 
26
  { TSQLDBPostGreSQLDDEngine }
 
27
 
 
28
  TSQLDBPostGreSQLDDEngine = Class(TSQLDBDDEngine)
 
29
  Protected
 
30
    Function CreateConnection(AConnectString  : String) : TSQLConnection; override;
 
31
  Public
 
32
    Class function Description : string; override;
 
33
    Class function DBType : String; override;
 
34
  end;
 
35
 
 
36
Procedure RegisterPostgreSQLDDengine;
 
37
Procedure UnRegisterPostgreSQLDDengine;
 
38
 
 
39
implementation
 
40
 
 
41
uses pqconnection;
 
42
 
 
43
procedure RegisterPostgreSQLDDengine;
 
44
begin
 
45
  RegisterDictionaryEngine(TSQLDBPostGreSQLDDEngine);
 
46
end;
 
47
 
 
48
procedure UnRegisterPostgreSQLDDengine;
 
49
begin
 
50
  UnRegisterDictionaryEngine(TSQLDBPostGreSQLDDEngine);
 
51
end;
 
52
 
 
53
{ TSQLDBPostGreSQLDDEngine }
 
54
 
 
55
function TSQLDBPostGreSQLDDEngine.CreateConnection(AConnectString: String
 
56
  ): TSQLConnection;
 
57
begin
 
58
  Result:=TPQConnection.Create(Self);
 
59
end;
 
60
 
 
61
class function TSQLDBPostGreSQLDDEngine.Description: string;
 
62
begin
 
63
  Result:='PostGreSQL using SQLDB';
 
64
end;
 
65
 
 
66
class function TSQLDBPostGreSQLDDEngine.DBType: String;
 
67
begin
 
68
  Result:='PostGreSQL';
 
69
end;
 
70
 
 
71
end.
 
72