classes/Input/Search.php
protected function applyEquality($comparison, $query, $field, $input)
	{
		// Make SQL safe values
		$safe_field = $this->makeSafeField($field);
		$safe_input = $input  == '' ?
			'NULL' : DB::connection()->getPdo()->quote($input);

		// Different engines have different APIs
		switch(DB::getDriverName())
		{
			case 'mysql': return $this->applyMysqlEquality(
					$comparison, $query, $safe_field, $safe_input);
			case 'sqlite': return $this->applySqliteEquality(
					$comparison, $query, $safe_field, $safe_input);
            case 'sqlsrv': return $this->applySqlServerEquality(
					$comparison, $query, $safe_field, $safe_input);
        }
	}
protected function applyEquality($comparison, $query, $field, $input)
	{
		// Make SQL safe values
		$safe_field = $this->makeSafeField($field);
		$safe_input = $input  == '' ?
			'NULL' : DB::connection()->getPdo()->quote($input);

		// Different engines have different APIs
		switch(DB::getDriverName())
		{
			case 'mysql': return $this->applyMysqlEquality(
					$comparison, $query, $safe_field, $safe_input);
			case 'sqlite': return $this->applySqliteEquality(
					$comparison, $query, $safe_field, $safe_input);
            case 'sqlsrv': return $this->applySqlServerEquality(
					$comparison, $query, $safe_field, $safe_input);
        }
	}
protected function applyEquality ( $ comparison , $ query , $ field , $ input ) { // Make SQL safe values $ safe_field = $ this -> makeSafeField ( $ field ) ; $ safe_input = $ input == '' ? 'NULL' : DB :: connection ( ) -> getPdo ( ) -> quote ( $ input ) ; // Different engines have different APIs switch ( DB :: getDriverName ( ) ) { case 'mysql' : return $ this -> applyMysqlEquality ( $ comparison , $ query , $ safe_field , $ safe_input ) ; case 'sqlite' : return $ this -> applySqliteEquality ( $ comparison , $ query , $ safe_field , $ safe_input ) ; case 'sqlsrv' : return $ this -> applySqlServerEquality ( $ comparison , $ query , $ safe_field , $ safe_input ) ; } }
Make the NULL-safe equals query

@param  string $comparison
@param  Builder $query
@param  string $field
@param  string $input
@return Builder
Make the NULL - safe equals query