Skip to content

Commit 0fbf498

Browse files
committed
Adding documentation for setOutputDialect.
1 parent 60e9263 commit 0fbf498

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,15 @@ $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);
154154
$magicQuery = new \Mouf\Database\MagicQuery($conn);
155155
```
156156

157+
Also, if you have no connection to your database configured but you want to generate SQL in some specific dialect, you can
158+
instead set the DBAL database platform used:
159+
160+
```php
161+
$magicQuery->setOutputDialect(new \Doctrine\DBAL\Platforms\PostgreSqlPlatform());
162+
$magicQuery = new \Mouf\Database\MagicQuery();
163+
```
164+
165+
157166
What about performances?
158167
------------------------
159168

0 commit comments

Comments
 (0)