Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 37 lines (28 sloc) 1.77 kB
022781c @beberlei Convert Documentation from Markdown to RST.
beberlei authored
1 Supporting Other Databases
2 ==========================
3
4 To support a database which is not currently shipped with Doctrine
5 you have to implement the following interfaces and abstract
6 classes:
7
8
9 - ``\Doctrine\DBAL\Driver\Driver``
10 - ``\Doctrine\DBAL\Driver\Statement``
11 - ``\Doctrine\DBAL\Platforms\AbstractPlatform``
12 - ``\Doctrine\DBAL\Schema\AbstractSchemaManager``
13
14 For an already supported platform but unsupported driver you only
15 need to implement the first two interfaces, since the SQL
16 Generation and Schema Management is already supported by the
17 respective platform and schema instances. You can also make use of
18 several Abstract Unittests in the ``\Doctrine\Tests\DBAL`` package
19 to check if your platform behaves like all the others which is
20 necessary for SchemaTool support, namely:
21
22
23 - ``\Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase``
24 - ``\Doctrine\Tests\DBAL\Functional\Schema\AbstractSchemaManagerTestCase``
25
26 We would be very happy if any support for new databases would be
27 contributed back to Doctrine to make it an even better product.
28
6629948 @beberlei Add subchapter on implementation details
beberlei authored
29 Implementation Steps in Detail
30 ------------------------------
31
32 1. Add your driver shortcut to class-name `Doctrine\DBAL\DriverManager`.
33 2. Make a copy of tests/dbproperties.xml.dev and adjust the values to your driver shortcut and testdatabase.
34 3. Create three new classes implementing ``\Doctrine\DBAL\Driver\Driver``, ``\Doctrine\DBAL\Driver\Statement``
35 and ``Doctrine\DBAL\Driver``. You can take a look at the ``Doctrine\DBAL\Driver\OCI8`` driver.
36 4. You can run the testsuite of your new database driver by calling "cd tests/ && phpunit -c myconfig.xml Doctrine/Tess/AllTests.php"
37 5. Start implementing AbstractPlatform and AbstractSchemaManager. Other implementations should serve as good example.
Something went wrong with that request. Please try again.