krowinski / php-mysql-replication

Pure PHP Implementation of MySQL replication protocol. This allow you to receive event like insert, update, delete with their data and raw SQL queries.
MIT License
323 stars 98 forks source link

feat: Add regular expression matching support for `checkDatabasesOnly` or `checkTablesOnly` #129

Open Moln opened 4 days ago

Moln commented 4 days ago

$config = (new ConfigBuilder())->withDatabasesRegex(['/^foo_.*/'])->build();
self::assertFalse($config->checkDataBasesOnly('foo_20240101'));

$config = (new ConfigBuilder())->withTablesRegex(['/^foo_.*/'])->build();
self::assertFalse($config->checkTablesOnly('foo_20240101'));