Skip to content

euautomation/canon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

canon

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages