@param Table $table
@param array $rows

@return RowSet
198541
public static function fromRowArray(Table $table, array $rows) : RowSet
    {
        $self = new self($table);

        foreach ($rows as $row) {
            $self->rows[] = $self->createRow($row);
        }

        return $self;
    }
667072
protected function fillRows(array $rows)
    {
        $row = [];
        $seriesOptions = $this->seriesOptions();
        foreach ($seriesOptions as $serieId => $serieOpts) {
            $row[$serieId] = '0';
        }

        $starts = clone($this->startDate());
        $ends = $this->endDate();
        while ($starts < $ends) {
            $x = $starts->format($this->dateFormat());
            if (!isset($rows[$x])) {
                $rows[$x] = $row;
            }
            $starts->add($this->dateInterval());
        }
        ksort($rows);
        return $rows;
    }
1246692
public function getTableCreate($tables)
	{
		$this->connect();

		$result = array();

		// Sanitize input to an array and iterate over the list.
		$tables = (array) $tables;

		foreach ($tables as $table)
		{
			// Set the query to get the table CREATE statement.
			$this->setQuery('SHOW CREATE TABLE ' . $this->quoteName($this->escape($table)));
			$row = $this->loadRow();

			// Populate the result array based on the create statements.
			$result[$table] = $row[1];
		}

		return $result;
	}
500482
public function merge(array $rows, $column, $alias, $table, $link)
    {
        foreach ($rows as &$row) {
            if (isset($row[$column])) {
                $value = $row[$column];

                $set = $this->querySlaveTable($table, $link, $value);
                $set = $this->getPreparedSet($set, $link);

                $row[$alias] = $set;
                unset($row[$column]);
            }
        }

        return $rows;
    }
800743
public function from($tables)
	{
		$tables = func_get_args();

		$this->_from = array_merge($this->_from, $tables);

		return $this;
	}
1139206
private function getResultSetWithoutSlaveColumnId(array $rows, $slaveColumnId)
    {
        // To be returned
        $result = array();

        foreach ($rows as $row) {
            // Make sure the name is valid
            if (isset($row[$slaveColumnId])) {
                unset($row[$slaveColumnId]);
            }

            // Append filtered $row array to the outputting array
            $result[] = $row;
        }

        return $result;
    }
926722
protected function row(Row $row, array $cells)
	{
		$html = '<tr';
		$this->addAttributes($html, $row->getAttributes());
		$html .= '>' . implode('', $cells) . '</tr>';

		return $html;
	}
315639
private function getTableTags($tables, $rows)
    {
        $tags = [];
        $type = $this->reflector->getType();

        foreach ($tables as $table) {
            $isSpecific = (isset($rows[$table]) && !empty($rows[$table]));

            // These types of queries require a specific tag
            if (($type === Reflector::QUERY_TYPE_SELECT && $isSpecific) ||
                ($type === Reflector::QUERY_TYPE_UPDATE && !$isSpecific) ||
                ($type === Reflector::QUERY_TYPE_DELETE && !$isSpecific) ||
                ($type === Reflector::QUERY_TYPE_TRUNCATE)) {

                $tags[] = $this->prefix($table, self::PREFIX_TABLE_SPECIFIC);
            }

            // While these ones require an unspecific one
            if (($type === Reflector::QUERY_TYPE_SELECT && !$isSpecific) ||
                ($type === Reflector::QUERY_TYPE_UPDATE) ||
                ($type === Reflector::QUERY_TYPE_DELETE) ||
                ($type === Reflector::QUERY_TYPE_INSERT)) {

                $tags[] = $this->prefix($table, self::PREFIX_TABLE_UNSPECIFIC);
            }
        }

        return $tags;
    }
108438
public function setRows($rows)
    {
        $this->rows = $rows;
        $this->rowsString = sprintf('`%s`', implode('`,`', $this->rows));

        return $this;
    }
224960
protected function createEntities(array $rows, $entityClass = null, $table = null)
    {
        if ($table === null) {
            $table = $this->getTable();
        }
        $entities = [];
        $collection = Result::createInstance($rows, $table, $this->connection, $this->mapper);
        $primaryKey = $this->mapper->getPrimaryKey($this->getTable());
        if ($entityClass !== null) {
            foreach ($rows as $dibiRow) {
                $entity = $this->entityFactory->createEntity(
                    $entityClass,
                    $collection->getRow($dibiRow->$primaryKey)
                );
                $entity->makeAlive($this->entityFactory);
                $entities[$dibiRow->$primaryKey] = $entity;
            }
        } else {
            foreach ($rows as $dibiRow) {
                $row = $collection->getRow($dibiRow->$primaryKey);
                $entityClass = $this->mapper->getEntityClass($this->getTable(), $row);
                $entity = $this->entityFactory->createEntity($entityClass, $row);
                $entity->makeAlive($this->entityFactory);
                $entities[$dibiRow->$primaryKey] = $entity;
            }
        }
        return $this->entityFactory->createCollection($entities);
    }
620448
protected function insertBatch( $table, $rows ) {

        $columns = $this->getColumns( $rows );
        if ( empty( $columns ) ) return;

        $query = $this->insertHead( $table, $columns );
        $lists = $this->valueLists( $rows, $columns );
        $query .= implode( ", ", $lists );

        $this->onQuery( $query );

        $statement = $this->prepare( $query );
        $statement->execute();

        return $statement;

    }
1003111
public static function rows(array $fields): Rows
    {
        return new class($fields) extends Rows {
            /**
             * @var array
             */
            private $fields;

            /**
             *  constructor.
             *
             * @param array $fields
             */
            public function __construct(array $fields)
            {
                $this->fields = $fields;
            }

            /**
             * @return array
             */
            public function fields(): array
            {
                return $this->fields;
            }
        };
    }
1195998
public function table($table = [])
    {
        $tables = $this->prepareNames(func_get_args());
        $this->tables = array_merge($this->tables ?: [], $tables);
        return $this;
    }
1101446
protected function table($headers, $rows)
    {
        if($this->console instanceof Command) {
            $this->console->table($headers, $rows);
        }
    }
206304
public function insert($table, $row)
	{
		$keys = implode('`, `', array_keys($row));
        $holds = implode(',', array_fill(0, count($row), '?'));
		$vals = array_values($row);

		$sql = "INSERT INTO `{$table}` (`{$keys}`) VALUES({$holds})";

        $stmt = $this->prepare($sql);
        return $stmt ? $stmt->execute($vals) : false;
	}
188650
public function insert($table, $rows, $keys = null, $options = []) {
		return $this->object->insert($table, $rows, $keys, $options);
	}
381996
function insert( $rows, $method = null ) {

        return $this->db->insert( $this->table, $rows, $method );

    }