for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/******************************************************************************
* An implementation of dicto (scg.unibe.ch/dicto) in and for PHP.
*
* Copyright (c) 2016, 2015 Richard Klees <[email protected]>
* This software is licensed under The MIT License. You should have received
* a copy of the license along with the code.
*/
namespace Lechimp\Dicto\Variables;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
class Except extends Combinator {
/**
* @inheritdocs
public function id() {
return "except";
}
public function compile(ExpressionBuilder $builder, $table_name, $negate = false) {
if ($negate) {
throw \LogicException("NYI!");
return $builder->andX
( $this->left()->compile($builder, $table_name)
, $this->right()->compile($builder, $table_name, true)
);