Get statements.

@return statements
976439
@Override
    public List<Statement> getStatements() {
        List<Statement> result = new LinkedList<>();
        for (ShardingExecuteGroup<StatementExecuteUnit> each : getExecuteGroups()) {
            result.addAll(Lists.transform(each.getInputs(), new Function<StatementExecuteUnit, Statement>() {
                
                @Override
                public Statement apply(final StatementExecuteUnit input) {
                    return input.getStatement();
                }
            }));
        }
        return result;
    }
186581
public function getItems()
    {
        $statement = (null !== $this->c && null !== $this->d) ? $this->getStatementDay() : $this->getStatementPagination();
        $result = $statement->execute((is_array($this->select)) ? $this->select[1] : null);
        $resultSet = clone $this->resultSetPrototype;

        $this->result = $resultSet->initialize($result);

        return $this->result;
    }
1344913
public function getPrettyStatement()
    {
        $assoc = [];
        $statement = $this->statement;
        foreach ($this->data as $key => $value) {
            if (is_numeric($key)) {
                $statement = $this->strReplaceOnce('?', "'" . $value . "'", $statement);
            } else {
                $assoc[] = $key;
            }
        }
        // Sort non-numeric keys descending by their string length.
        usort($assoc, function ($a, $b) {
            $alen = strlen($a);
            $blen = strlen($b);
            if ($alen === $blen) {
                return 0;
            }
            return $alen > $blen ? -1 : 1;
        });
        // Replace the longest keys first. This avoids conflicts/overlaps of shorter keys.
        foreach ($assoc as $key) {
            $statement = str_replace($key, "'" . $this->data[$key] . "'", $statement);
        }
        return $statement;
    }
1079738
public function select()
    {
        $query     = 'SELECT ' . $this->getQueryFields() . ' FROM ' . $this->getTable() . ' ' . $this->getQueryWhere() . ' ' . $this->getQueryOrderBy() . ' ' . $this->getQueryLimit();
        $statement = $this->db->prepare($query);
        $statement->execute($this->binds);

        $this->clear();

        $collection = array();

        while (false !== ($row = $statement->fetchObject())) {
            $collection[] = $this->newDataInstance($row, true);
        }

        return $collection;
    }
1039032
public function getStatementPagination()
    {
        if (null !== $this->c && is_array($this->c)) {
            $co = (reset($this->c) === 'ASC' || reset($this->c) === '>') ? '>' : '<';
            $cc = key($this->c);
        } else
            if (null !== $this->c && ! is_array($this->c)) {
                $co = ($this->o === 'ASC' || $this->o === '>') ? '>' : '<';
                $cc = $this->c;
                $this->o = [];
            }

        if (is_array($this->select)) {
            $query = $this->select[0];
            if (! empty($cc)) {
                // @TODO check choise AND or WHERE and insertion before ORDER LIMIT GROUPBY
                $query = sprintf('%s AND %s %s %s', $query, $cc, $co, $this->s);
            }
            
            if(null !== $this->p && null !== $this->n) {
                $query = sprintf('%s LIMIT %d OFFSET %d', $query, $this->n, (($this->p - 1) * $this->n));
            }
            $adt = $this->sql->getAdapter();

            $statement = $adt->query($query, $adt::QUERY_MODE_PREPARE);
        } else {
            $table = $this->select->getRawState(Select::TABLE);
            $cols = $this->select->getRawState(Select::COLUMNS);
            $joins = $this->select->getRawState(Select::JOINS);
            $ords = array_merge($this->o, $this->select->getRawState(Select::ORDER));
            $fords = [];

            foreach ($joins as $value) {
              if(!empty($value['columns'])) {
                $cols = array_merge($cols,$value['columns']);
              }
            }


            if (count($cols) === 1 && reset($cols) === '*') {
                foreach ($ords as $ok => $ov) {
                    if(strpos($ok, '.') === false) {
                        $fords[$ok] = $ov;
                    } else {
                        $tmp = explode('.', $ok);
                        if($tmp[0] === $table) {
                            $fords[$tmp[1]] = $ov;
                        }
                    }
                }
            } else {
                foreach ($ords as $ok => $ov) {
                    if (is_int($ok) && is_string($ov)) {
                        $tmp = explode(' ', $ov);
                        $ok = $tmp[0];
                        $ov = (count($tmp) === 2) ? $tmp[1] : 'ASC';
                    }
                    if(!is_int($ok)) {
                       $tmp = $this->checkColumns($ok, $table, $cols);
                       if ($tmp !== false) {
                           $fords[$tmp] = $ov;
                       }
                    }
                }
            }

            $Select = new Select();
            $Select->columns(array('*'));
            $Select->from(array('original_select' => $this->select));
            if (! empty($cc)) {
                if (count($cols) === 1 && reset($cols) === '*') {
                    if(strpos($cc, '.') !== false) {
                        $tmp = explode('.', $ok);
                        $cc = ($tmp[0] === $table) ? $tmp[1] : false;
                    }
                } else {
                    $cc = $this->checkColumns($cc, $table, $cols);
                }

                if ($cc !== false) {
                    $Select->where(array($cc . ' ' . $co . ' ?' => $this->s));
                }
            }
            
            if(null !== $this->p && null !== $this->n) {
                $Select->offset((($this->p - 1) * $this->n));
                $Select->limit($this->n);
            }
            $Select->order($fords);

            $statement = $this->sql->prepareStatementForSqlObject($Select);
        }

        return $statement;
    }
887270
public function getCreateStatement()
    {
        $sql = [];

        foreach ($this->tables as $table) {
            /** @var Table $table*/
            $createTable = new CreateTable($table->getName());
            $createTable->setAdapter($this->getAdapter());
            $createTable->setColumns($table->getColumns());
            $createTable->setConstraints($table->getConstraints());
            $sql[] = $createTable->getQueryString();
        }
        return implode(';', $sql);
    }
1109204
public function getQueries()
    {
        return array_merge(
            $this->getDropSequenceQueries(),
            $this->getDropViewQueries(),
            $this->getRenameTableQueries(),
            $this->getDropCheckQueries(),
            $this->getDropForeignKeyQueries(),
            $this->getDropIndexQueries(),
            $this->getDropPrimaryKeyQueries(),
            $this->getDropTableQueries(),
            $this->getDropColumnQueries(),
            $this->getAlterColumnQueries(),
            $this->getCreateColumnQueries(),
            $this->getCreateTableQueries(),
            $this->getCreatePrimaryKeyQueries(),
            $this->getCreateIndexQueries(),
            $this->getCreateForeignKeyQueries(),
            $this->getCreateCheckQueries(),
            $this->getCreateViewQueries(),
            $this->getCreateSequenceQueries(),
            $this->getRenameSchemaQueries()
        );
    }
1220222
public function getStatement()
	{
		return (is_object($this->statement))
				? $this->interpolate($this->statement->queryString, $this->bindings)
				: $this->statement;
	}
1366256
public function getAll()
    {
        $query = $this->createQuery();
        $result = $this->database->query($query);

        $entities = [];
        if ($result) {
            $result = $result->fetchAll(\PDO::FETCH_ASSOC);
            $entities = $this->handleResult($result);
        }
        if ($this->returnOne && is_array($entities)) {
            return current($entities);
        }
        return $entities;
    }
143135
public function getResults()
    {
        if (is_null($this->_resultsCache)) {
            $this->_resultsCache = call_user_func($this->getMapper());

            if ($this->prefetchRelatedLookups && !$this->_prefetchRelatedDone) {
                $this->_prefetchRelatedObjects();
            }
        }

        return $this->_resultsCache;
    }
613180
public function getResults()
    {
        if (empty($this->results)) {
            $this->results = $this->stmt->fetchAll();
        }

        return $this->results;
    }
224952
private function getStatementLexingMethods() : array
    {
        $statements = [
            $this->directiveDelimiters[0] => 'lexDirectiveStatement',
            $this->sanitizedTagDelimiters[0] => 'lexSanitizedTagStatement',
            $this->unsanitizedTagDelimiters[0] => 'lexUnsanitizedTagStatement',
            $this->commentDelimiters[0] => 'lexCommentStatement',
            '<?php' => 'lexPhpStatement',
            '<?' => 'lexPhpStatement'
        ];

        /**
         * In case one delimiter is a substring of the other ("{{" and "{{!"), we want to sort the delimiters
         * so that the longest delimiters come first
         */
        uksort($statements, function ($a, $b) {
            if (strlen($a) > strlen($b)) {
                return -1;
            } else {
                return 1;
            }
        });

        return $statements;
    }
983343
public List<StatementGroup> getAllStatementGroups() {
        final List<StatementGroup> ret = new ArrayList<StatementGroup>();
        ret.addAll(statementGroups);
        for (final StatementGroup sg : statementGroups) {
            ret.addAll(sg.getAllStatementGroups());
        }
        return ret;
    }
658721
def get_statements(subject: nil)
      raise TriplestoreAdapter::TriplestoreException.new("#{@provider.class.name} missing get_statements method.") unless @provider.respond_to?(:get_statements)
      @provider.get_statements(subject: subject)
    end
1059533
private function parseUseStatement()
    {
        $class = '';
        $alias = '';
        $statements = array();
        $explicitAlias = false;
        while (($token = $this->next())) {
            $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
            if (!$explicitAlias && $isNameToken) {
                $class .= $token[1];
                $alias = $token[1];
            } else if ($explicitAlias && $isNameToken) {
                $alias .= $token[1];
            } else if ($token[0] === T_AS) {
                $explicitAlias = true;
                $alias = '';
            } else if ($token === ',') {
                $statements[$alias] = $class;
                $class = '';
                $alias = '';
                $explicitAlias = false;
            } else if ($token === ';') {
                $statements[$alias] = $class;
                break;
            } else {
                break;
            }
        }

        return $statements;
    }
305857
public function findAll() {
        $statement = new SelectStatement();
        $statement->setStatementContext($this->statementContext);
        $statement->setCondition($this->condition);
        $sql = $statement->parse();

        $rows = $this->connection->queryAll($sql, $this->statementContext->getParameters());

        $this->clear();

        return $rows;
    }
1028601
public function getData()
    {
        try {
            $this->parse();
            $organized_statements = array();
            foreach ($this->dependencies as $name=>$preset) {
                foreach ($preset->getStatements() as $type=>$statements) {
                    if (!isset($organized_statements[$type])) {
                        $organized_statements[$type] = array();
                    }
                    foreach ($statements as $statement) {
                        $organized_statements[$type][] = $statement;
                    }
                }
            }
            foreach ($organized_statements as $type=>$stacks) {
                $organized_statements[$type] = $preset->getOrderedStatements($stacks);
            }
        } catch (\Exception $e) {
            throw $e;
        }
        return $organized_statements;
    }