Getting started¶
Learn how to install and get started with the CrateDB DBAL driver.
Table of contents
Prerequisites¶
Your project must be using Composer.
Set up as a dependency¶
The driver is available as a package.
Add the driver package to you project composer.json file, like this:
{
"require": {
"crate/crate-dbal":"~2.3.0"
}
}
If you’re using Doctrine ORM, you must add the doctrine/orm
dependency
too. So the both additions together will look like this:
{
"require": {
"crate/crate-dbal":"~2.3.0",
"doctrine/orm": "*"
}
}
Install¶
Once the package has been configured as a dependency, you can install it, like so:
sh$ composer install
Afterwards, if you are not already doing so, you must require the Composer autoload.php file. You can do this by adding a line like this to your PHP application:
require __DIR__ . '/vendor/autoload.php';
See also
For more help with Composer, consult the Composer documentation.
Next steps¶
Learn how to connect to CrateDB.