Skip to content

Releases: corley/influxdb-php-sdk

First stable realease - 1.0.0

01 Jul 12:54
Compare
Choose a tag to compare

After almost 3 years (first commit by @gianarb on Sep 10, 2014) we finally decided to tag this version as our first stable branch 1.0.0 in order to keep stable our project.

In this release we just seal the base implementation and interfaces.

This project is now tested with the latest InfluxDB 1.2.4 branch

Breaking changes

  • Drop Guzzle 4 support (in favor of PHP 7.1)

Implemented new escapes for: comma, equal sign and spaces

16 Apr 08:25
Compare
Choose a tag to compare

Implemented comma, equal sign and space escaping

Fixes minor casing issue

05 Nov 10:13
Compare
Choose a tag to compare

Fixes minor casing issue on namespace import

Fixes minor casing issue

05 Nov 10:09
Compare
Choose a tag to compare

Fixes minor casing issue on namespace import

Minor updates

18 Oct 15:48
Compare
Choose a tag to compare

Just removed Zend Framework library support that is not used anymore in v0.9 as v0.8 and fixes the PHPUnit configuration file with a more clear and usable testsuite configuration

./vendor/bin/phpunit --testsuite unit
./vendor/bin/phpunit --testsuite integration

InfluxDB Manager

18 Oct 13:42
Compare
Choose a tag to compare

In order to supports different database related queries like:

  • create database
  • list database
  • delete database
  • and so on...

We should have to fill the base client InfluxDB\Client with several methods:

public function createDatabase($name) { /* ... */ }
public function deleteDatabase($name) { /* ... */ }
public function getDatabases() { /* ... */ }
public function createRetentionPolicy($name) { /* ... */ }
// ...

As many as InfluxDB prepared queries. Instead of that we drop the database management query from the InfluxDB\Client and add a new layer: InfluxDB\Manager that will support InfluxDB prepared queries.

The manager

$manager = new Manager($client);

The manager accepts any query via callables:

$manager->addQuery("queryName", function($arg1, $arg2) {
    return sprintf("THIS IS MY QUERY WITH: {$arg1} and {$arg2}");
});

// late in your code: 
$manager->queryName(1, 2); // THIS IS MY QUERY WITH: 1 and 2

In order to create and share different database management query, objects can used:

class MyCustomQuery
{
    public function __invoke($arg1, $arg2)
    {
        return sprintf("THIS IS MY QUERY WITH: {$arg1} and {$arg2}");
    }

    public function __toString()
    {
        return "myCustomQuery";
    }
}

// add it
$manager->addQuery(new MyCustomQuery());

// use it
$manager->myCustomQuery(1, 2);

Less dependencies

18 Oct 15:47
Compare
Choose a tag to compare

Just removed Zend Framework library support that is not used anymore in v0.8

Deprecate database management methods

18 Oct 13:24
Compare
Choose a tag to compare

In order to create a better support for database management e custom query support, we deprecate methods:

  • getDatabases
  • createDatabase
  • deleteDatabase

and we will remove those methods in v0.9.0 and we will introduce a manager in order to support those features

$manager->addQuery("getExceptionsInMinutes", function($minutes) {
    return "SELECT * FROM errors WHERE time > now() - {$minutes}m";
});

//late in your code...
$data = $manager->getExceptionsInMinutes(10);

Moved to readers and writers

10 Oct 07:00
Compare
Choose a tag to compare

With the 0.7.* version of this library we cannot read and write data using different network adapters. In particular write using UDP/IP and read data back with HTTP. For that reason we move the library removing network adapters and move the project to readers and writers

With this approach you can combine different techniques for reads and writes.

$reader = new Http\Reader($http, $httpOptions);
$writer = new Udp\Writer($udpOptions);
$client = new Client($reader, $writer);

$client->mark(...); // Use UDP/IP support
$client->query("SELECT * FROM my_serie"); // Use HTTP support

BC BREAK

  • Client constructor (Readers and Writers)

Type hinting, point time fields and minor refactors

13 Sep 16:02
Compare
Choose a tag to compare

New features

  • #56 Added point type hinting (IntType, BoolType, StringType and FloatType)

Improved

  • #57 Simplified library message to InfluxDB line protocol
  • #55 Test this library also against InfluxDB nightly builds