This package is abandoned and no longer maintained. No replacement package was suggested.

A WHERE matching thing

v1.1 2020-11-09 12:41 UTC

This package is auto-updated.

Last update: 2023-08-09 21:26:42 UTC


README

Using something like the WHERE part of an SQL query to evaluate an array like thing is true or false.

Basic Usage

use EUAutomation\Canon\Processor;
$processor = new Processor();
$expressions = $processor->process('foo = "bar"');
$expressions->evaluate([ "foo" => "bar" ]); // true

Supports

  • Basic Operators (=, !=, >, >=, <, <=) foo > 9000
  • LIKE Operator foo LIKE "shoes%"
  • LIKE ANY Operator foo LIKE ANY ("shoes%", "socks%")
  • IN Operator foo IN (1, 2)
  • Nested Columns Refs foo.bar = 'baz'
  • Brackets foo = 2 AND (bar = 3 OR baz < 10)

Acknowledgments