fpddmysql80.pp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. MySQL 5.7 Data Dictionary Engine Implementation.
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  11. **********************************************************************}
  12. unit fpddmysql80;
  13. {$mode objfpc}{$H+}
  14. interface
  15. uses
  16. Classes, SysUtils, sqldb, fpdatadict, fpddsqldb;
  17. Type
  18. { TSQLDBMySql80DDEngine }
  19. TSQLDBMySql80DDEngine = Class(TSQLDBDDEngine)
  20. Protected
  21. Function CreateConnection(AConnectString : String) : TSQLConnection; override;
  22. Public
  23. Class function Description : string; override;
  24. Class function DBType : String; override;
  25. end;
  26. Procedure RegisterMySQL80DDEngine;
  27. Procedure UnRegisterMySQL80DDEngine;
  28. implementation
  29. uses mysql80conn;
  30. Procedure RegisterMySQL80DDEngine;
  31. begin
  32. RegisterDictionaryEngine(TSQLDBMySQL80DDEngine);
  33. end;
  34. Procedure UnRegisterMySQL80DDEngine;
  35. begin
  36. UnRegisterDictionaryEngine(TSQLDBMySQL80DDEngine);
  37. end;
  38. { TSQLDBMySql80DDEngine }
  39. function TSQLDBMySql80DDEngine.CreateConnection(AConnectString: String
  40. ): TSQLConnection;
  41. begin
  42. Result:=mysql80conn.TMySQL80Connection.Create(Self);
  43. end;
  44. class function TSQLDBMySql80DDEngine.Description: string;
  45. begin
  46. Result:='Mysql 8.0 connection using SQLDB';
  47. end;
  48. class function TSQLDBMySql80DDEngine.DBType: String;
  49. begin
  50. Result:='MySQL 8.0';
  51. end;
  52. end.