Posted: 01.06.2010, 19:34
silvioprog, mdaems, HI !
Here is a code that I mentioned in a previous message. Here and there, tried to write comments English. However, the code is fairly transparent.
Yes. More. This code is tied to the version 7.0.0 alpha. True code components had slightly modified in order to gain direct access to the API PostgreSQL. Can you please explain to me why it was encapsulated?! WHY?
Standardization of the interface is still not possible because each database uses its API ... A Delphi interface - and you can not half work.
Long live C + +!
Here is a code that I mentioned in a previous message. Here and there, tried to write comments English. However, the code is fairly transparent.
Yes. More. This code is tied to the version 7.0.0 alpha. True code components had slightly modified in order to gain direct access to the API PostgreSQL. Can you please explain to me why it was encapsulated?! WHY?
Standardization of the interface is still not possible because each database uses its API ... A Delphi interface - and you can not half work.
Long live C + +!
Code: Select all
//-- DESIGNED FOR CodeGear RAD Studio 2010 & lightly modifyed version ZEOS 7.0.0 alpha!
//-- in ZEOS - src\plain\ZPlainPostgreSqlDriver.pas :
/*
add after TZPOSTGRESQL_API = record ..... end; :
PAPI = ^TZPOSTGRESQL_API;
in define IZPostgreSQLPlainDriver before "end;"
add:
function GetPlainFunc():PAPI; ///Rog
in TZPostgreSQLBaseDriver = class(TZ....
at the end of class definition- add:
function GetPlainFunc():PAPI; ///rog
and function body (implementation section of unit):
// rog
function TZPostgreSQLBaseDriver.GetPlainFunc():PAPI;
begin
result:= @POSTGRESQL_API;
end;
My note:
This mods maked for easy acess to plain Postgres API interface, not
use Delphi as interface-transmitter! I can`t understand, why pascal-programmers
do its anytime?????!!!!! :) C/C++ FOREVER!
Hidding plain API, on my mind, don`t needed - vary BAD IDEA.
*/