Class PointDataValues
Point defines the values that will be written to the database. See Go Implementation.
Implements
Inherited Members
Namespace: InfluxDB3 .Client.Write
Assembly: InfluxDB3.Client.dll
Syntax
public class PointDataValues : IEquatable<PointDataValues>
Methods
AsPoint()
Creates new Point with this as values.
Declaration
public PointData AsPoint()
Returns
Type | Description |
---|---|
Point |
Point from this values. |
AsPoint(string)
Creates new Point with this as values with given measurement.
Declaration
public PointData AsPoint(string measurement)
Parameters
Type | Name | Description |
---|---|---|
string | measurement | the point measurement |
Returns
Type | Description |
---|---|
Point |
Point from this values with given measurement. |
AsPointData()
Creates new Point with this as values.
Declaration
public PointData AsPointData()
Returns
Type | Description |
---|---|
Point |
Point from this values. |
AsPointData(string)
Creates new Point with this as values with given measurement.
Declaration
public PointData AsPointData(string measurement)
Parameters
Type | Name | Description |
---|---|---|
string | measurement | the point measurement |
Returns
Type | Description |
---|---|
Point |
Point from this values with given measurement. |
Copy()
Creates a copy of this object.
Declaration
public PointDataValues Copy()
Returns
Type | Description |
---|---|
Point |
A new instance with same values. |
Equals(PointDataValues?)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(PointDataValues? other)
Parameters
Type | Name | Description |
---|---|---|
Point |
other | An object to compare with this object. |
Returns
Type | Description |
---|---|
bool | true if the current object is equal to the |
Equals(object?)
Determines whether the specified object, is equal to this instance.
Declaration
public override bool Equals(object? obj)
Parameters
Returns
Overrides
GetBooleanField(string)
Gets the bool field value associated with the specified name. If the field is not present, returns null.
Declaration
public bool? GetBooleanField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
bool? | The bool field value or null |
GetDoubleField(string)
Gets the double field value associated with the specified name. If the field is not present, returns null.
Declaration
public double? GetDoubleField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
double? | The double field value or null |
GetField(string)
Get field of given name. Can be null if field doesn't exist.
Declaration
public object? GetField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
object | Field as object |
GetFieldNames()
Gets an array of field names associated with this object.
Declaration
public string[] GetFieldNames()
Returns
Type | Description |
---|---|
string[] | An array of field names. |
GetFieldType(string)
Gets the type of field with given name, if it exists. If the field is not present, returns null.
Declaration
public Type? GetFieldType(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
Type | The field type or null. |
GetField<T>(string)
Get field of given name as type. Can be null if field doesn't exist.
Declaration
public T? GetField<T>(string name) where T : struct
Parameters
Type | Name | Description |
---|---|---|
string | name |
Returns
Type | Description |
---|---|
T? | Field as given type |
Type Parameters
Name | Description |
---|---|
T |
Exceptions
Type | Condition |
---|---|
Invalid |
Field doesn't match given type |
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
GetIntegerField(string)
Gets the integer field value associated with the specified name. If the field is not present, returns null.
Declaration
public long? GetIntegerField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
long? | The integer field value or null |
GetMeasurement()
Get measurement name.
Declaration
public string? GetMeasurement()
Returns
Type | Description |
---|---|
string | Measurement name |
GetStringField(string)
Gets the string field value associated with the specified name. If the field is not present, returns null.
Declaration
public string? GetStringField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
string | The string field value or null |
GetTag(string)
Gets value of tag with given name. Returns null if tag not found.
Declaration
public string? GetTag(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the tag name |
Returns
Type | Description |
---|---|
string | tag value or null |
GetTagNames()
Gets an array of tag names.
Declaration
public string[] GetTagNames()
Returns
Type | Description |
---|---|
string[] | An array of tag names |
GetTimestamp()
Get timestamp. Can be null if not set.
Declaration
public BigInteger? GetTimestamp()
Returns
Type | Description |
---|---|
Big |
timestamp or null |
GetUintegerField(string)
Gets the uinteger field value associated with the specified name. If the field is not present, returns null.
Declaration
public ulong? GetUintegerField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the field name |
Returns
Type | Description |
---|---|
ulong? | The uinteger field value or null |
HasFields()
Has point any fields?
Declaration
public bool HasFields()
Returns
Type | Description |
---|---|
bool | true, if the point contains any fields, false otherwise. |
Measurement(string)
Create a new Point withe specified a measurement name.
Declaration
public static PointDataValues Measurement(string measurementName)
Parameters
Type | Name | Description |
---|---|---|
string | measurementName | the measurement name |
Returns
Type | Description |
---|---|
Point |
the new Point |
RemoveField(string)
Removes a field with the specified name if it exists; otherwise, it does nothing.
Declaration
public PointDataValues RemoveField(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the field to be removed. |
Returns
Type | Description |
---|---|
Point |
this |
RemoveTag(string)
Removes a tag with the specified name if it exists; otherwise, it does nothing.
Declaration
public PointDataValues RemoveTag(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | the tag name |
Returns
Type | Description |
---|---|
Point |
this |
SetBooleanField(string, bool)
Adds or replaces a bool field.
Declaration
public PointDataValues SetBooleanField(string name, bool value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetDoubleField(string, double)
Adds or replaces a double field.
Declaration
public PointDataValues SetDoubleField(string name, double value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, bool)
Adds or replaces a field with a bool value.
Declaration
public PointDataValues SetField(string name, bool value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, double)
Adds or replaces a field with a double value.
Declaration
public PointDataValues SetField(string name, double value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, long)
Adds or replaces a field with a long value.
Declaration
public PointDataValues SetField(string name, long value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, object)
Adds or replaces a field with an object value.
Declaration
public PointDataValues SetField(string name, object value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, string)
Adds or replaces a field with a string value.
Declaration
public PointDataValues SetField(string name, string value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetField(string, ulong)
Adds or replaces a field with a ulong value.
Declaration
public PointDataValues SetField(string name, ulong value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetFields(Dictionary<string, object>)
Add fields according to their type.
Declaration
public PointDataValues SetFields(Dictionary<string, object> fields)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, object> | fields | the name-value dictionary |
Returns
Type | Description |
---|---|
Point |
this |
SetIntegerField(string, long)
Adds or replaces a integer field.
Declaration
public PointDataValues SetIntegerField(string name, long value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetMeasurement(string)
Create new Point with this values and provided measurement.
Declaration
public PointDataValues SetMeasurement(string measurementName)
Parameters
Type | Name | Description |
---|---|---|
string | measurementName | the measurement name |
Returns
Type | Description |
---|---|
Point |
copy of this Point with given measurement name |
SetStringField(string, string)
Adds or replaces a string field.
Declaration
public PointDataValues SetStringField(string name, string value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetTag(string, string)
Adds or replaces a tag value for a point.
Declaration
public PointDataValues SetTag(string name, string value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
SetTimestamp(DateTime)
Updates the timestamp for the point represented by Date
Declaration
public PointDataValues SetTimestamp(DateTime timestamp)
Parameters
Type | Name | Description |
---|---|---|
Date |
timestamp | the timestamp |
Returns
Type | Description |
---|---|
Point |
SetTimestamp(DateTimeOffset)
Updates the timestamp for the point represented by Date
Declaration
public PointDataValues SetTimestamp(DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
Date |
timestamp | the timestamp |
Returns
Type | Description |
---|---|
Point |
SetTimestamp(long, WritePrecision?)
Updates the timestamp for the point.
Declaration
public PointDataValues SetTimestamp(long timestamp, WritePrecision? timeUnit = null)
Parameters
Type | Name | Description |
---|---|---|
long | timestamp | the timestamp |
Write |
timeUnit | the timestamp precision. Default is 'nanoseconds'. |
Returns
Type | Description |
---|---|
Point |
SetTimestamp(BigInteger)
Updates the timestamp for the point.
Declaration
public PointDataValues SetTimestamp(BigInteger timestamp)
Parameters
Type | Name | Description |
---|---|---|
Big |
timestamp | the timestamp in nanosecond |
Returns
Type | Description |
---|---|
Point |
SetTimestamp(TimeSpan)
Updates the timestamp for the point represented by Time
Declaration
public PointDataValues SetTimestamp(TimeSpan timestamp)
Parameters
Type | Name | Description |
---|---|---|
Time |
timestamp | the timestamp |
Returns
Type | Description |
---|---|
Point |
SetUintegerField(string, ulong)
Adds or replaces a uinteger field.
Declaration
public PointDataValues SetUintegerField(string name, ulong value)
Parameters
Returns
Type | Description |
---|---|
Point |
this |
Operators
operator ==(PointDataValues?, PointDataValues?)
Implements the operator ==.
Declaration
public static bool operator ==(PointDataValues? left, PointDataValues? right)
Parameters
Type | Name | Description |
---|---|---|
Point |
left | The left. |
Point |
right | The right. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(PointDataValues, PointDataValues)
Implements the operator !=.
Declaration
public static bool operator !=(PointDataValues left, PointDataValues right)
Parameters
Type | Name | Description |
---|---|---|
Point |
left | The left. |
Point |
right | The right. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |