hectororm / connection
Hector Connection
Requires
- php: ^8.0
- ext-pdo: *
- berlioz/helpers: ^1.6
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Note
This repository is a read-only split from the main HectorORM repository.
For contributions, issues, or more information, please visit the main HectorORM repository.
Do not open issues or pull requests here.
Hector Connection is the PDO connection module of Hector ORM. Can be used independently of ORM.
📖 Full documentation
Installation
You can install Hector Connection with Composer, it's the recommended installation.
$ composer require hectororm/connection
Documentation
CHECK constraint capabilities
DriverCapabilities::hasCheckConstraints() reports enforced CHECK support.
DriverCapabilities::hasDropCheck() reports native ALTER TABLE ... DROP CHECK
syntax support.
| Engine | hasCheckConstraints() |
hasDropCheck() |
|---|---|---|
| MySQL 8.0.16+ | true |
true (DROP CHECK) |
| MariaDB 10.2.1+ | true |
false (DROP CONSTRAINT in the MySQL dialect) |
| SQLite | true |
false (table rebuild required) |
| PostgreSQL | true |
false (DROP CONSTRAINT) |
| Older MySQL/MariaDB | false |
false |
| Vitess / unknown | false |
false |
Compatibility: third-party implementations of DriverCapabilities must add
both methods when upgrading. Return false when support cannot be established.
These values describe engine support; they do not inspect session settings that
disable enforcement or imply availability of a schema plan dialect. PostgreSQL
has native CHECK support but currently has no schema plan compiler.
For offline use, resolve capabilities from the intended engine and version:
use Hector\Connection\Driver\DriverInfo; $capabilities = (new DriverInfo('mysql', '8.0.16'))->getCapabilities(); $supportsChecks = $capabilities->hasCheckConstraints();
Consumers must treat missing capabilities or a false result as unsupported for
enforced CHECK operations, rather than assuming a recent MySQL-compatible server.
For usage and examples, visit the official documentation on gethectororm.com.