Browse Source

+ add SQL-DB data dictionary engines for MySQL 5.6 and 5.7

git-svn-id: trunk@37577 -
svenbarth 7 years ago
parent
commit
eb7059cea8

+ 2 - 0
.gitattributes

@@ -2169,6 +2169,8 @@ packages/fcl-db/src/datadict/fpddmysql41.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddmysql50.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddmysql51.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddmysql55.pp svneol=native#text/plain
+packages/fcl-db/src/datadict/fpddmysql56.pp svneol=native#text/plain
+packages/fcl-db/src/datadict/fpddmysql57.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddodbc.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddoracle.pp svneol=native#text/plain
 packages/fcl-db/src/datadict/fpddpq.pp svneol=native#text/plain

+ 74 - 0
packages/fcl-db/src/datadict/fpddmysql56.pp

@@ -0,0 +1,74 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2007 by Michael Van Canneyt, member of the
+    Free Pascal development team
+
+    MySQL 5.6 Data Dictionary Engine Implementation.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit fpddmysql56;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, sqldb, fpdatadict, fpddsqldb;
+  
+Type
+  { TSQLDBMySql56DDEngine }
+
+  TSQLDBMySql56DDEngine = Class(TSQLDBDDEngine)
+  Protected
+    Function CreateConnection(AConnectString  : String) : TSQLConnection; override;
+  Public
+    Class function Description : string; override;
+    Class function DBType : String; override;
+  end;
+
+Procedure RegisterMySQL56DDEngine;
+Procedure UnRegisterMySQL56DDEngine;
+
+implementation
+
+uses mysql56conn;
+
+Procedure RegisterMySQL56DDEngine;
+
+begin
+  RegisterDictionaryEngine(TSQLDBMySQL56DDEngine);
+end;
+
+Procedure UnRegisterMySQL56DDEngine;
+
+begin
+  UnRegisterDictionaryEngine(TSQLDBMySQL56DDEngine);
+end;
+
+{ TSQLDBMySql56DDEngine }
+
+function TSQLDBMySql56DDEngine.CreateConnection(AConnectString: String
+  ): TSQLConnection;
+begin
+  Result:=mysql56conn.TMySQL56Connection.Create(Self);
+end;
+
+class function TSQLDBMySql56DDEngine.Description: string;
+begin
+  Result:='Mysql 5.6 connection using SQLDB';
+end;
+
+class function TSQLDBMySql56DDEngine.DBType: String;
+begin
+  Result:='MySQL 5.6';
+end;
+
+end.
+

+ 74 - 0
packages/fcl-db/src/datadict/fpddmysql57.pp

@@ -0,0 +1,74 @@
+{
+    This file is part of the Free Pascal run time library.
+    Copyright (c) 2007 by Michael Van Canneyt, member of the
+    Free Pascal development team
+
+    MySQL 5.7 Data Dictionary Engine Implementation.
+
+    See the file COPYING.FPC, included in this distribution,
+    for details about the copyright.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+ **********************************************************************}
+unit fpddmysql57;
+
+{$mode objfpc}{$H+}
+
+interface
+
+uses
+  Classes, SysUtils, sqldb, fpdatadict, fpddsqldb;
+  
+Type
+  { TSQLDBMySql57DDEngine }
+
+  TSQLDBMySql57DDEngine = Class(TSQLDBDDEngine)
+  Protected
+    Function CreateConnection(AConnectString  : String) : TSQLConnection; override;
+  Public
+    Class function Description : string; override;
+    Class function DBType : String; override;
+  end;
+
+Procedure RegisterMySQL57DDEngine;
+Procedure UnRegisterMySQL57DDEngine;
+
+implementation
+
+uses mysql57conn;
+
+Procedure RegisterMySQL57DDEngine;
+
+begin
+  RegisterDictionaryEngine(TSQLDBMySQL57DDEngine);
+end;
+
+Procedure UnRegisterMySQL57DDEngine;
+
+begin
+  UnRegisterDictionaryEngine(TSQLDBMySQL57DDEngine);
+end;
+
+{ TSQLDBMySql57DDEngine }
+
+function TSQLDBMySql57DDEngine.CreateConnection(AConnectString: String
+  ): TSQLConnection;
+begin
+  Result:=mysql57conn.TMySQL57Connection.Create(Self);
+end;
+
+class function TSQLDBMySql57DDEngine.Description: string;
+begin
+  Result:='Mysql 5.7 connection using SQLDB';
+end;
+
+class function TSQLDBMySql57DDEngine.DBType: String;
+begin
+  Result:='MySQL 5.7';
+end;
+
+end.
+