Class: TMMConnection
property MaxAllowedPacketBytes : Int64; { read-only }
property PhpPostMaxBytes : Int64; { read-only }
property PhpUploadMaxBytes : Int64; { read-only }
property PhpMemLimitBytes : Int64; { read-only } // -1 = unlimited
property LimitsVersion : Integer; { read-only }
Server limits populated by the last successful
TestConnection call.
All values are 0 / -1 until a successful
TestConnection.
| Property | Description |
|---|---|
MaxAllowedPacketBytes |
MySQL max_allowed_packet; caps inline BLOB and batch
size |
PhpPostMaxBytes |
PHP post_max_size; caps all HTTP POST bodies |
PhpUploadMaxBytes |
PHP upload_max_filesize; caps per-file multipart
uploads |
PhpMemLimitBytes |
PHP memory_limit; -1 = unlimited;
0 = not yet fetched |
LimitsVersion |
Monotonically increasing counter; incremented each time server limits are refreshed |
TMMUpdater.Prepare and TMMScript.Execute
read these values automatically to derive InlineThreshold,
BlobChunkSize, and BlobMaxSizeBytes when those
are still at their defaults.
The three helper methods below encapsulate the derivation formulas
and are called automatically by TMMUpdater.Prepare and
TMMScript.Execute. They are also available for explicit
calls when an application needs the derived values before constructing a
TMMScript or TMMUpdater.
function SuggestInlineThreshold: Integer;
function SuggestBlobChunkSize: Integer;
procedure SuggestBlobDownloadLimits(out AMaxSizeBytes: Int64);
| Method | Returns | Used by |
|---|---|---|
SuggestInlineThreshold |
Recommended InlineThreshold for TMMUpdater
in bytes; 0 when no server data is available |
TMMUpdater.Prepare (when
InlineThreshold = 0) |
SuggestBlobChunkSize |
Recommended BlobChunkSize for TMMUpdater
in bytes; 0 when no server data is available |
TMMUpdater.Prepare (when BlobChunkSize is
still at default 512 KB) |
SuggestBlobDownloadLimits |
Recommended BlobMaxSizeBytes for TMMScript
via AMaxSizeBytes; 0 when
memory_limit is unknown |
TMMScript.Execute (when
BlobMaxSizeBytes = 0) |
All three return 0 / leave out-params at 0
when TestConnection has not been called or the server did
not return limit data. Return values are 0 when no server
data is available.
property MySQLDatabase : string; { read-only }
property TableNames : TArray<string>; { read-only }
property DatabaseStructure: TMMTableColumnArray; { read-only }
Read-only properties populated automatically after each successful
TestConnection call (requires PHP backend v188+ / v189+).
On older PHP versions all three remain at their empty defaults; the
connection test still succeeds.
| Property | Description |
|---|---|
MySQLDatabase |
Name of the active MySQL database, or '' when no
database is selected (PHP v189+) |
TableNames |
Sorted list of BASE TABLE names in the connected database (PHP v188+) |
DatabaseStructure |
Flat list of (TableName, ColumnName, ColumnType) for
every column of every BASE TABLE (PHP v188+). ColumnType is
the full MySQL type including parameters,
e.g. 'VARCHAR(30)', 'DECIMAL(10,2)' |
These properties are cleared whenever any credential property
(DBHost, DBName, DBUser,
DBPassword, APIURL, APIKey) is
changed. Call RefreshDatabaseInfo to
re-populate them without repeating a full
TestConnection.
See TMMTableColumn
for the DatabaseStructure element type.
procedure RefreshDatabaseInfo;
Re-fetches MySQLDatabase, TableNames, and
DatabaseStructure from the server without performing a full
TestConnection round-trip.
Useful when:
Credentials and APIURL / APIKey must
already be configured. Failure is silent — the existing property values
are retained unchanged. Requires PHP backend v188+ / v189+; on older
versions the call is a no-op.