Skip to content

Commit 7b9533e

Browse files
committed
added getDriver method to repositories
1 parent bb36b21 commit 7b9533e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ All the methods listed under SqlWriteRepository, SqlReadRepository and SqlPageRe
264264
- `public function transactional(callable $transaction)`
265265
- `public function count(Filter $filter = null)`
266266
- `public function exists(Identity $id)`
267+
- `public function getDriver()`
267268

268269
### Available in SqlReadRepository
269270

@@ -272,13 +273,14 @@ All the methods listed under SqlWriteRepository, SqlReadRepository and SqlPageRe
272273
- `public function findByDistinct(Fields $distinctFields, Filter $filter = null, Sort $sort = null, Fields $fields = null)`
273274
- `public function count(Filter $filter = null)`
274275
- `public function exists(Identity $id)`
276+
- `public function getDriver()`
275277

276278
### Available in SqlPageRepository
277279

278280
- `public function findAll(Pageable $pageable = null)`
279281
- `public function count(Filter $filter = null)`
280282
- `public function exists(Identity $id)`
281-
283+
- `public function getDriver()`
282284
---
283285

284286
# Data Operations

tests/Infrastructure/Model/Repository/Sql/SqlRepositoryTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ public function setUp()
3030
$this->repository = new CustomerRepository($this->pdo, new SqliteCustomerMappingWithCustomId());
3131
}
3232

33+
public function testGetDriver()
34+
{
35+
$this->assertInstanceOf('\Doctrine\DBAL\Query\QueryBuilder', $this->repository->getDriver());
36+
}
37+
3338
public function testAddWhenAutoGeneratedIdTrue()
3439
{
3540
$mapping = new SqliteCustomerMappingWithGeneratedId();

0 commit comments

Comments
 (0)