Perform a standard query

@param string $queryString
@param string $suggestedClass
@throws \Slab\Database\Exceptions\Query
@return \Slab\Database\Providers\BaseResponse
541436
public function query($queryString, $suggestedClass = NULL)
    {
        if (!empty($this->log)) {
            $this->log->debug("Performing SQL: " . $queryString . '...', 'DATABASE');
        }

        $result = $this->mysqli->query($queryString);

        if (!empty($this->mysqli->error)) {
            throw new \Slab\Database\Exceptions\Query("Query error: " . $queryString . " with error " . $this->mysqli->error);
        }

        if (empty($result)) {
            throw new \Slab\Database\Exceptions\Query("Query Failed: " . $queryString . " with no error.");
        }

        $affectedRows = 0;
        $error = '';

        try
        {
            $affectedRows = $this->mysqli->affected_rows;
            $error = $this->mysqli->error;
        }
        catch (\Throwable $exception)
        {
            //This means we're in a test environment
        }

        $response = new Response();
        $response->initializeFromQueryResults(
            $result,
            $affectedRows,
            $error,
            $suggestedClass
        );

        return $response;
    }
1247416
public function createComparatorConstraint(string $queryStr) {
		return new SimpleComparatorConstraint($this->criteriaItem, $this->operator, CrIt::c($queryStr));
	}
1294352
public static function from($queryClassAndAlias)
    {
        list($class, $alias) = ModelCriteria::getClassAndAlias($queryClassAndAlias);
        $queryClass = $class . 'Query';
        if (!class_exists($queryClass)) {
            throw new PropelException('Cannot find a query class for ' . $class);
        }
        $query = new $queryClass();
        if ($alias !== null) {
            $query->setModelAlias($alias);
        }

        return $query;
    }
994605
public static function cls($class, $since = null, $suggest = null): void
    {
        if ($suggest && preg_match('/\s/', $suggest) === 0) {
            $suggest = ltrim($suggest, '\\');
            $suggest = "Use ${suggest} instead.";
        }
        $class = ltrim($class, '\\');

        static::warn($class, $since, $suggest);
    }
1278588
public function startQuery($queryString)
    {
        $this->queries[$this->counter] = array('query' => $queryString);
        $this->timer                   = time() + microtime(true);
    }
479206
public function registerHandler(string $queryClass, string $serviceName): void
    {
        if (!Validate::implementsInterface($queryClass, Query::class)) {
            $message = sprintf('Invalid query class: %s', $queryClass);
            throw new DomainException($message);
        }

        $type = Type::create($queryClass)->toString();

        $this->handlers[$type] = $serviceName;
    }
842225
public function runQuery($queryString){

		$this->affectedRows = false;
		if($this->dbCharset !== null)
			$queryString = iconv($this->charset, $this->dbCharset . '//IGNORE', $queryString);

		$result = $this->resource->query($queryString);

		if($result === false)
			throw new DriverException($this->resource->lastErrorMsg(), $this->resource->lastErrorCode(), $queryString);

		$this->affectedRows = $this->resource->changes();
		return $result;
	}
1263886
public function getQuery($model = 'db', $queryClass = '')
    {
        if (!isset($this->query[$model])) {
            $class               = $queryClass ?: $this->config['query'];

            $this->query[$model] = new $class($this, 'db' == $model ? '' : $model);
        }
        return $this->query[$model];
    }
496435
public function query($query_text,$whichCon='',$params=false)
    {
        $current = $this->connection->defaultDatabase($whichCon);
        $this->connection->selectDB($this->dbName, $whichCon);
        $ret = $this->connection->query($query_text, $whichCon='', $params);
        if ($current) {
            $this->connection->selectDB($current, $whichCon);
        }

        return $ret;
    }
25073
public function createConditionalAvailabilitySkuSearchQuery(?string $searchString): QueryInterface
    {
        $searchQuery = $this->getConditionalAvailabilitySkuSearchQueryPlugin();
        if ($searchQuery instanceof SearchStringSetterInterface) {
            $searchQuery->setSearchString($searchString);
        }

        return $searchQuery;
    }
1282052
protected Query<E> query(String queryString) {
        return currentSession().createQuery(requireNonNull(queryString), getEntityClass());
    }
845477
public function query($query_text,$which_connection='',$params=false)
    {
        $con = $this->getNamedConnection($which_connection);

        $result = (!is_object($con)) ? false : $con->Execute($query_text,$params);
        if (!$result) {
            $errorMsg = $this->failedQueryMsg($query_text, $params, $which_connection);
            $this->logger($errorMsg);

            if ($this->throw_on_fail) {
                throw new \Exception($errorMsg);
            }
        }

        return $result;
    }
278782
public function search(array $params, $class, string $idField, string $usernameField): ActiveDataProvider
    {
        $query = $class::find();

        $dataProvider = new ActiveDataProvider([
            'query' => $query,
            'pagination' => [
                'pageSize' => $this->pageSize,
            ],
        ]);

        $this->load($params);

        if (!$this->validate()) {
            return $dataProvider;
        }

        $query->andFilterWhere([$idField => $this->id]);
        $query->andFilterWhere(['like', $usernameField, $this->username]);

        return $dataProvider;
    }
1175244
public static function executeClass($classString, $forcedParams = null)
    {
        list($className, $methodName) = explode('::', $classString);
        preg_match('/\(.*?\)/', $methodName, $parameters);

        if (count($parameters) > 0) {
            $methodName = str_replace($parameters[0], '', $methodName);
            $parameters = explode(',', str_replace(['(', ')'], '', $parameters[0]));
        }

        $class = resolve($className);

        return $class->$methodName($forcedParams, ...$parameters);
    }
871291
protected function buildUserSearchQuery($searchString = null)
    {
        $builder = $this->createQueryBuilder('u');

        if (!empty($searchString)) {
            $builder
                ->where($builder->expr()->like('u.email', ':searchString'))
                ->orWhere($builder->expr()->like('u.displayName', ':searchString'))
                ->setParameter('searchString', '%' .$searchString . '%');
        }

        return $builder;
    }
1370791
public function createQueryParser(string $rulesClass): JsonApiQueryParserInterface
    {
        $serializedData = FluteSettings::getJsonQuerySerializedRules($this->getFluteSettings());

        /** @var FormatterFactoryInterface $formatterFactory */
        $formatterFactory = $this->getContainer()->get(FormatterFactoryInterface::class);
        $parser           = new QueryParser(
            $rulesClass,
            JsonApiQueryRulesSerializer::class,
            $serializedData,
            new ContextStorage(JsonApiQueryRulesSerializer::readBlocks($serializedData), $this->getContainer()),
            new CaptureAggregator(),
            new ErrorAggregator(),
            new JsonApiErrorCollection($formatterFactory->createFormatter(Messages::NAMESPACE_NAME)),
            $this->getContainer()->get(FormatterFactoryInterface::class)
        );

        return $parser;
    }
836152
public static QueryBuilder byInstanceId(Object localId, Class entityClass){
        Validate.argumentsAreNotNull(localId, entityClass);
        return new QueryBuilder(new IdFilterDefinition(instanceId(localId, entityClass)));
    }