@param string|array $where
@param string       $that

@return bool
761681
private function checkAllow($where, $that)
    {
        if (is_array($where) && !array_search('*', $where)) {
            $this->logger->info('Checking permissions '.$that.', in: '.var_export($where, true));

            return  in_array($that, $where) ? true : false;
        }

        if ($where == '*' || (is_array($where) && array_search('*', $where)) || (trim($where) == trim($that))) {
            $this->logger->info('Checking permissions '.$that.', in: '.$where);

            return true;
        }

        return false;
    }
99367
public function delete( $table, $where ) {
		if ( ! isset( $this->table_defines[ $table ] ) ) {
			return false;
		}

		if ( $this->is_logical( $this->table_defines[ $table ] ) ) {
			$data = $this->set_update_params( [], false, false, true );

			return $this->update( $table, $data, $where );
		}

		/** @var \wpdb $wpdb */
		global $wpdb;
		$columns = $this->table_defines[ $table ]['columns'];

		list ( $_where, $_where_format ) = $this->filter( $where, $columns );

		return $wpdb->delete( $this->get_table( $table ), $_where, $_where_format );
	}
973153
public function where($where)
    {
        if (is_string($where)) {
            $where = [$where];
        }
        
        $this->where = array_merge($this->where, $where);
        
        return $this;
    }
622791
protected function whereSubquery(array $where)
    {
        return $this->wrap($where['column']) . ' ' . $where['operator'] . ' (' . $this->select($where['subquery']->getSQLStatement()) . ')';
    }
1113318
public function where(array $where)
    {
        $this->applyCriteria();
        $this->applyScope();

        $this->applyConditions($where);

        return $this;
    }
16836
public function isUpdate($update = true, $where = null)
    {
        if (is_bool($update)) {
            $this->exists = $update;

            if (!empty($where)) {
                $this->updateWhere = $where;
            }
        } else {
            $this->exists      = true;
            $this->updateWhere = $update;
        }

        return $this;
    }
640251
final public function delete( array $where, $table = '', $place_holders = [] ) {
		if ( ! $place_holders ) {
			try {
				$place_holders = $this->get_place_holders( $where );
			} catch ( \Exception $e ) {
				return false;
			}
		}
		return $this->db->delete( $table ?: $this->table, $where, $place_holders );
	}
321755
public function remove($where, $params = array())
    {
        if (empty($where)) {
            return false;
        }

        $query = "DELETE FROM {$this->getLibName()} WHERE {$where}";
        $statement = $this->pdo->prepare($query);
        $statement->execute($params);
        $this->lastSql = $query;
        return $statement->rowCount();
    }
791592
public function deleteWhere(array $where)
    {
        $this->applyScope();

        $this->applyConditions($where);

        $deleted = $this->model->delete();

        event(new RepositoryEntityDeleted($this, $this->model->getModel()));

        $this->resetModel();

        return $deleted;
    }
585993
public function exist($where = null): Statement
    {
        $this->operation = 'exist';
        $this->fields = '*';
        if ($where) {
            $this->where = $where;
        }
        return $this;
    }
833787
public function load($where)
    {
        $where = self::processWhere($where);

        $old_primary_key = $this->getPrimaryKey();

        $database = self::getDatabase();
        $data = $database->get(static::TABLE, static::COLUMNS, $where);
        if ($data) {
            $this->reset();
            $this->data = $data;
            if ($old_primary_key) {
                $this->managerUpdate($old_primary_key);
            } else {
                $this->managerExport();
            }
            return true;
        }

        return false;
    }
516505
protected function isContain($what, $where)
    {
        if (empty($what)) {
            return true;
        }

        if (empty($where)) {
            return false;
        }

        if (strpos((string) $where, (string) $what) !== false) {
            return true;
        }

        return false;
    }
245189
public function deleteWhere(array $where)
    {
        $this->applyScope();

        $temporarySkipPresenter = $this->skipPresenter;
        $this->skipPresenter(true);

        $this->applyConditions($where);

        $deleted = $this->model->delete();

        event(new RepositoryEntityDeleted($this, $this->model->getModel()));

        $this->skipPresenter($temporarySkipPresenter);
        $this->resetModel();

        return $deleted;
    }
645144
public function addWhere(array $where)
    {
        if (count($where) !== 3) {
            throw new OrmException('Method "where" must have 3 parameters.');
        }

        $this->wheres[] = $where;

        $this->sql['where'] .= " ".$this->logicOperator." ".$this->addConditionsToSql()." ";

        $this->logicOperator = " AND ";
    }
1346248
private function assembleWhere($where = array())
    {
        if (is_array($where)) {
            switch ($where['operator']) {
                case Operator::$equals:
                    return $this->buildEquals($where['field'], $where['value']);
                case Operator::$doesNotEqual:
                    return $this->buildDoesNotEqual($where['field'], $where['value']);
                case Operator::$greaterThanOrEqual:
                    return $this->buildGreaterThanOrEquals($where['field'], $where['value']);
                case Operator::$lessThanOrEqual:
                    return $this->buildLessThanOrEquals($where['field'], $where['value']);
                case Operator::$approximateEqual:
                    return $this->buildApproximatelyEquals($where['field'], $where['value']);
                case Operator::$startsWith:
                    return $this->buildStartsWith($where['field'], $where['value']);
                case Operator::$endsWith:
                    return $this->buildEndsWith($where['field'], $where['value']);
                case Operator::$contains:
                    return $this->buildContains($where['field'], $where['value']);
                case Operator::$wildcard:
                    return $this->buildWildcard($where['field']);
            }
        }

        return;
    }
342076
public function countBy(array $where = [])
    {
        $query = $this->make();

        $query = $this->applyWhere($query, $where);

        return $query->count();
    }
192388
public function isEqualTo(LocalDateRange $that) : bool
    {
        return $this->startDate->isEqualTo($that->startDate)
            && $this->endDate->isEqualTo($that->endDate);
    }