corley / dbal-influxdb
Installs: 14
Dependents: 0
Suggesters: 1
Security: 0
Stars: 8
Watchers: 1
Forks: 4
Open Issues: 0
pkg:composer/corley/dbal-influxdb
Requires
- corley/influxdb-sdk: 0.5.*
- doctrine/dbal: ~2
Requires (Dev)
- phpunit/phpunit: ~4
This package is not auto-updated.
Last update: 2025-09-27 22:59:45 UTC
README
InfluxDB driver for Doctrine DBAL (Abstraction Layer)
Query builder
$qb = $conn->createQueryBuilder(); $qb->select("*") ->from("cpu_load_short") ->where("time = ?") ->setParameter(0, 1434055562000000000); $data = $qb->execute(); foreach ($data->fetchAll() as $element) { // Use your element }
Create a connection
$config = new \Doctrine\DBAL\Configuration(); //.. $connectionParams = array( 'dbname' => 'mydb', 'user' => 'root', 'password' => 'root', 'host' => 'localhost', 'port' => 8086, "driverClass" => "Corley\\DBAL\\Driver\\InfluxDB", ); $conn = \Doctrine\DBAL\DriverManager::getConnection($connectionParams, $config);