Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/corley/dbal-influxdb
Doctrine DBAL for influxDB
https://github.com/corley/dbal-influxdb
Last synced: 6 days ago
JSON representation
Doctrine DBAL for influxDB
- Host: GitHub
- URL: https://github.com/corley/dbal-influxdb
- Owner: corley
- License: mit
- Created: 2015-06-30T21:30:40.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-07-01T19:05:09.000Z (over 9 years ago)
- Last Synced: 2024-08-02T07:12:14.412Z (3 months ago)
- Language: PHP
- Size: 164 KB
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-influxdb - dbal-influxdb - Doctrine DBAL for InfluxDB (Queries / Other tools)
README
# Doctrine DBAL for InfluxDB
[![Circle CI](https://circleci.com/gh/corley/dbal-influxdb/tree/master.svg?style=svg)](https://circleci.com/gh/corley/dbal-influxdb/tree/master)
[![Code Coverage](https://scrutinizer-ci.com/g/corley/dbal-influxdb/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/corley/dbal-influxdb/?branch=master)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/corley/dbal-influxdb/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/corley/dbal-influxdb/?branch=master)InfluxDB driver for Doctrine DBAL (Abstraction Layer)
## Query builder
```php
$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
```php
$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);
```