mini\Table\Contracts\TableInterface::except() Method

public abstract

Signature

public abstract function except(mini\Table\Contracts\SetInterface $other): mini\Table\Contracts\TableInterface

Parameters

Name Type Default Description
$other mini\Table\Contracts\SetInterface required Documentation missing

Returns

mini\Table\Contracts\TableInterface

Documentation

Return rows that are in this table but NOT in the other set (set difference)

Enables all negation operations:

// WHERE status != 'inactive'
$table->except($table->eq('status', 'inactive'))

// WHERE id NOT IN (1, 2, 3)
$table->columns('id')->except(new Set('id', [1, 2, 3]))

// WHERE name IS NOT NULL
$table->except($table->eq('name', null))

// INTERSECT (A AND B) = A - (A - B)
$a->except($a->except($b))

Source

src/Table/Contracts/TableInterface.php:201