Property | Type | Description | |
---|---|---|---|
$client | |||
$name | string | The name of the Database |
Method | Description | |
---|---|---|
__construct ( string $name, |
Construct a database object | |
alterRetentionPolicy ( InfluxDB\Database\RetentionPolicy $retentionPolicy ) | ||
create ( InfluxDB\Database\RetentionPolicy $retentionPolicy = null, boolean $createIfNotExists = true ) : influxdb\ResultSet | Create this database | |
createRetentionPolicy ( InfluxDB\Database\RetentionPolicy $retentionPolicy ) : influxdb\ResultSet | ||
drop ( ) | Drop this database | |
exists ( ) : boolean | ||
getClient ( ) : |
||
getName ( ) : string | ||
getQueryBuilder ( ) : InfluxDB\Query\Builder | Retrieve the query builder | |
listRetentionPolicies ( ) : array | ||
query ( string $query, array $params = [] ) : influxdb\ResultSet | Query influxDB | |
writePayload ( string | array $payload, string $precision = self::PRECISION_NANOSECONDS, string | null $retentionPolicy = null ) : boolean | Write a payload into InfluxDB using the current driver. This method is similar to writePoints(), except it takes a string payload instead of an array of Points. This is useful in the following situations: | |
writePoints ( array $points, string $precision = self::PRECISION_NANOSECONDS, string | null $retentionPolicy = null ) : boolean | Write points into InfluxDB using the current driver. This is the recommended method for inserting data into InfluxDB. |
Method | Description | |
---|---|---|
getRetentionPolicyQuery ( string $method, InfluxDB\Database\RetentionPolicy $retentionPolicy ) : string |
public __construct ( string $name, |
||
$name | string | |
$client |
public alterRetentionPolicy ( InfluxDB\Database\RetentionPolicy $retentionPolicy ) | ||
$retentionPolicy | InfluxDB\Database\RetentionPolicy |
public createRetentionPolicy ( InfluxDB\Database\RetentionPolicy $retentionPolicy ) : influxdb\ResultSet | ||
$retentionPolicy | InfluxDB\Database\RetentionPolicy | |
return | influxdb\ResultSet |
public getQueryBuilder ( ) : InfluxDB\Query\Builder | ||
return | InfluxDB\Query\Builder |
protected getRetentionPolicyQuery ( string $method, InfluxDB\Database\RetentionPolicy $retentionPolicy ) : string | ||
$method | string | |
$retentionPolicy | InfluxDB\Database\RetentionPolicy | |
return | string |
public writePayload ( string | array $payload, string $precision = self::PRECISION_NANOSECONDS, string | null $retentionPolicy = null ) : boolean | ||
$payload | string | array | InfluxDB payload (Or array of payloads) that conform to the Line syntax. |
$precision | string | The timestamp precision (defaults to nanoseconds). |
$retentionPolicy | string | null | Specifies an explicit retention policy to use when writing all points. If not set, the default retention period will be used. This is only applicable for the Guzzle driver. The UDP driver utilizes the endpoint configuration defined in the server's influxdb configuration file. |
return | boolean |
public writePoints ( array $points, string $precision = self::PRECISION_NANOSECONDS, string | null $retentionPolicy = null ) : boolean | ||
$points | array | Array of Point objects |
$precision | string | The timestamp precision (defaults to nanoseconds). |
$retentionPolicy | string | null | Specifies an explicit retention policy to use when writing all points. If not set, the default retention period will be used. This is only applicable for the Guzzle driver. The UDP driver utilizes the endpoint configuration defined in the server's influxdb configuration file. |
return | boolean |