src/Connection.php
public function insert(string $query, array $values = []): int
    {
        try {
            return $this->executeStatement($query, $values)->rowCount();
        } catch (\Throwable $exception) {
            throw static::wrapException($exception, $query, $values);
        }
    }
public function insert(string $query, array $values = []): int
    {
        try {
            return $this->executeStatement($query, $values)->rowCount();
        } catch (\Throwable $exception) {
            throw static::wrapException($exception, $query, $values);
        }
    }
public function insert ( string $ query , array $ values = [ ] ) : int { try { return $ this -> executeStatement ( $ query , $ values ) -> rowCount ( ) ; } catch ( \ Throwable $ exception ) { throw static :: wrapException ( $ exception , $ query , $ values ) ; } }
Performs an insert query and returns the number of inserted rows.

@param string $query Full SQL query
@param array $values Values to bind. The indexes are the names or numbers of the values.
@return int
@throws InvalidArgumentException
@throws PDOException
Performs an insert query and returns the number of inserted rows .