Search by

hectororm / connection

ElGigi

Hector Connection

Package info

github.com/hectororm/connection

Homepage

Issues

pkg:composer/hectororm/connection

Statistics

Installs: 9 418

Dependents: 4

Suggesters: 0

Stars: 0

v1.6.0 2026-10-17 23:38 UTC

This package is auto-updated.

Last update: 2026-10-17 23:40:25 UTC


README

Latest Version Packagist Dependency Version Software license

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.