The EDBApiClient library is a standalone Delphi library for
interacting with a remote MySQL/MariaDB server through the EDB2MySQL
REST API (edbapi.php). It provides three cooperating
TComponent-based classes:
TMMConnection — holds the endpoint
URL, API key, database credentials, and the EDB database reference.
Provides connectivity tests and metadata queries. One instance per
thread.TMMScript — executes a SQL script on
the server and materialises the result set into a local EDB temporary
table. All result information is exposed as properties after
Execute returns.TMMUpdater — writes rows from a local
EDB buffer table to a remote MySQL/MariaDB table via batch INSERT,
UPDATE, or UPSERT. Call Prepare to set up the buffer, fill
Table, then call Execute.The library has no VCL dependency and no dependency on any EDB2MySQL
unit other than EDBMMHttp (HTTP transport base) and
EDBMMUtils (type mapping and serialisation utilities). Use
it independently in any Delphi application that already uses
ElevateDB.
edbcomps)edbapi.php deployed on a web server with PHP 8.1+Add the following compiled units to your project’s library path and
add EDBMMClient to your uses clause:
| Unit | Role |
|---|---|
EDBMMClient.dcu |
Main library — TMMConnection, TMMScript,
TMMUpdater |
EDBMMHttp.dcu |
Shared HTTP transport base (TMMHttpClient,
TMMLogEvent) |
EDBMMUtils.dcu |
MySQL type mapping and serialisation utilities |
UErrorCodes.dcu |
Error code constants (EC_*), TAppError,
EAppError |
Add EDBMMClient to your uses clause for
normal use. Add UErrorCodes when your code checks specific
EC_* error code constants.
TMMConnection, TMMScript, and
TMMUpdater can be placed on a form or data module directly
from the component palette (EasyGate tab).
Install the design-time package EDBMMLibD370 in the IDE.
It requires the runtime package EDBMMLibR370. Once
installed, all three classes appear in the Object Inspector with their
key properties editable at design time:
| Class | Published properties available in OI |
|---|---|
TMMConnection |
APIURL, APIKey, DBHost,
DBName, DBUser, DBPassword,
TimeoutMs, Database, OnLog |
TMMScript |
Connection, SQL,
UseTransaction, BlobMaxSizeBytes,
InlineBlobMaxBytes, Table,
DefaultTransferFolder, MaxRows,
KeepTempTable, Params, OnLog,
OnProgress |
TMMUpdater |
Connection, TargetTable,
Mode, Where, UpdateColumnsList,
Table, KeepTempTable,
MaxBatchBytes, InlineThreshold,
BlobChunkSize, SkipFKChecks,
Params, OnLog, OnProgress,
OnWarning, OnBlobUploadActive |
SQL shows a memo editor button in the Object Inspector
for multi-line SQL entry. UpdateColumnsList shows a string
list editor for the column filter (one column name per line); it mirrors
the runtime UpdateColumns property.