Class PointDataValues
Point defines the values that will be written to the database. See Go Implementation.
Inheritance
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 |
---|---|
PointData | 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 |
---|---|---|
System.String | measurement | the point measurement |
Returns
Type | Description |
---|---|
PointData | Point from this values with given measurement. |
AsPointData()
Creates new Point with this as values.
Declaration
public PointData AsPointData()
Returns
Type | Description |
---|---|
PointData | 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 |
---|---|---|
System.String | measurement | the point measurement |
Returns
Type | Description |
---|---|
PointData | Point from this values with given measurement. |
Copy()
Creates a copy of this object.
Declaration
public PointDataValues Copy()
Returns
Type | Description |
---|---|
PointDataValues | 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 |
---|---|---|
PointDataValues | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Nullable<Object>)
Determines whether the specified
Declaration
public override bool Equals(object? obj)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Object> | obj | The |
Returns
Type | Description |
---|---|
System.Boolean |
|
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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<System.Boolean> | 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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<System.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 |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.Nullable<System.Object> | Field as object |
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 |
---|---|---|
System.String | name |
Returns
Type | Description |
---|---|
System.Nullable<T> | Field as given type |
Type Parameters
Name | Description |
---|---|
T |
GetFieldNames()
Gets an array of field names associated with this object.
Declaration
public string[] GetFieldNames()
Returns
Type | Description |
---|---|
System.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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<Type> | The field type or null. |
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<System.Int64> | The integer field value or null |
GetMeasurement()
Get measurement name.
Declaration
public string? GetMeasurement()
Returns
Type | Description |
---|---|
System.Nullable<System.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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<System.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 |
---|---|---|
System.String | name | the tag name |
Returns
Type | Description |
---|---|
System.Nullable<System.String> | tag value or null |
GetTagNames()
Gets an array of tag names.
Declaration
public string[] GetTagNames()
Returns
Type | Description |
---|---|
System.String[] | An array of tag names |
GetTimestamp()
Get timestamp. Can be null if not set.
Declaration
public BigInteger? GetTimestamp()
Returns
Type | Description |
---|---|
System.Nullable<BigInteger> | 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 |
---|---|---|
System.String | name | the field name |
Returns
Type | Description |
---|---|
System.Nullable<System.UInt64> | The uinteger field value or null |
HasFields()
Has point any fields?
Declaration
public bool HasFields()
Returns
Type | Description |
---|---|
System.Boolean | 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 |
---|---|---|
System.String | measurementName | the measurement name |
Returns
Type | Description |
---|---|
PointDataValues | 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 |
---|---|---|
System.String | name | The name of the field to be removed. |
Returns
Type | Description |
---|---|
PointDataValues | 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 |
---|---|---|
System.String | name | the tag name |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetBooleanField(String, Boolean)
Adds or replaces a bool field.
Declaration
public PointDataValues SetBooleanField(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Boolean | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetDoubleField(String, Double)
Adds or replaces a double field.
Declaration
public PointDataValues SetDoubleField(string name, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Double | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, Boolean)
Adds or replaces a field with a
Declaration
public PointDataValues SetField(string name, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Boolean | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, Double)
Adds or replaces a field with a
Declaration
public PointDataValues SetField(string name, double value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Double | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, Int64)
Adds or replaces a field with a
Declaration
public PointDataValues SetField(string name, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Int64 | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, Object)
Adds or replaces a field with an
Declaration
public PointDataValues SetField(string name, object value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Object | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, String)
Adds or replaces a field with a
Declaration
public PointDataValues SetField(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.String | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetField(String, UInt64)
Adds or replaces a field with a
Declaration
public PointDataValues SetField(string name, ulong value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.UInt64 | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetFields(Dictionary<String, Object>)
Add fields according to their type.
Declaration
public PointDataValues SetFields(Dictionary<string, object> fields)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<System.String, System.Object> | fields | the name-value dictionary |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetIntegerField(String, Int64)
Adds or replaces a integer field.
Declaration
public PointDataValues SetIntegerField(string name, long value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.Int64 | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetMeasurement(String)
Create new Point with this values and provided measurement.
Declaration
public PointDataValues SetMeasurement(string measurementName)
Parameters
Type | Name | Description |
---|---|---|
System.String | measurementName | the measurement name |
Returns
Type | Description |
---|---|
PointDataValues | 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
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.String | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetTag(String, String)
Adds or replaces a tag value for a point.
Declaration
public PointDataValues SetTag(string name, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the tag name |
System.String | value | the tag value |
Returns
Type | Description |
---|---|
PointDataValues | this |
SetTimestamp(DateTime)
Updates the timestamp for the point represented by
Declaration
public PointDataValues SetTimestamp(DateTime timestamp)
Parameters
Type | Name | Description |
---|---|---|
DateTime | timestamp | the timestamp |
Returns
Type | Description |
---|---|
PointDataValues |
SetTimestamp(DateTimeOffset)
Updates the timestamp for the point represented by
Declaration
public PointDataValues SetTimestamp(DateTimeOffset timestamp)
Parameters
Type | Name | Description |
---|---|---|
DateTimeOffset | timestamp | the timestamp |
Returns
Type | Description |
---|---|
PointDataValues |
SetTimestamp(Int64, Nullable<WritePrecision>)
Updates the timestamp for the point.
Declaration
public PointDataValues SetTimestamp(long timestamp, WritePrecision? timeUnit = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | timestamp | the timestamp |
System.Nullable<WritePrecision> | timeUnit | the timestamp precision. Default is 'nanoseconds'. |
Returns
Type | Description |
---|---|
PointDataValues |
SetTimestamp(TimeSpan)
Updates the timestamp for the point represented by
Declaration
public PointDataValues SetTimestamp(TimeSpan timestamp)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | timestamp | the timestamp |
Returns
Type | Description |
---|---|
PointDataValues |
SetUintegerField(String, UInt64)
Adds or replaces a uinteger field.
Declaration
public PointDataValues SetUintegerField(string name, ulong value)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | the field name |
System.UInt64 | value | the field value |
Returns
Type | Description |
---|---|
PointDataValues | this |
Operators
Equality(PointDataValues, PointDataValues)
Implements the operator ==.
Declaration
public static bool operator ==(PointDataValues left, PointDataValues right)
Parameters
Type | Name | Description |
---|---|---|
PointDataValues | left | The left. |
PointDataValues | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
Inequality(PointDataValues, PointDataValues)
Implements the operator !=.
Declaration
public static bool operator !=(PointDataValues left, PointDataValues right)
Parameters
Type | Name | Description |
---|---|---|
PointDataValues | left | The left. |
PointDataValues | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |