Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
franzose committed Apr 7, 2019
1 parent 21eb962 commit e174094
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
# doctrine-bulk-insert
Bulk insert functionality for the Doctrine 2
# Doctrine/DBAL Bulk Insert
The library is based on the [gist](https://gist.github.com/gskema/a182aaf7cc04001aebba9c1aad86b40b) and provides bulk insert functionality to the [Doctrine/DBAL](https://github.com/doctrine/dbal).

## Usage

```php
<?php

use Doctrine\DBAL\Connection;
use Franzose\DoctrineBulkInsert\Query;

// Prepare database connection
$connection = new Connection(...);

// Execute query and get affected rows back
$rows = (new Query($connection))->execute('foo', [
['foo' => 111, 'bar' => 222],
['foo' => 333, 'bar' => 444],
]);
```

0 comments on commit e174094

Please sign in to comment.