Class KsqlDbObject
Represents a Map or Struct in responses returned by ksqlDB.
Inheritance
Inherited Members
Namespace: Confluent.KsqlDb
Assembly: cs.temp.dll.dll
Syntax
public class KsqlDbObject
Properties
Count
Returns the number of entries in this object.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of entries in this object |
IsEmpty
If the object is empty
Declaration
public bool IsEmpty { get; }
Property Value
Type | Description |
---|---|
System.Boolean | True if the object is empty, false otherwise |
Item[String]
Looks up the value for a given key.
Declaration
public object this[string key] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to lookup |
Property Value
Type | Description |
---|---|
System.Object |
Methods
ContainsKey(String)
If the given key is contained withing this object.
Declaration
public bool ContainsKey(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key to lookup |
Returns
Type | Description |
---|---|
System.Boolean | True if the key exists, false otherwise |
GetBoolean(String)
Gets the value as a boolean, possibly converting if necessary.
Declaration
public bool GetBoolean(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Boolean | The boolean value for the given key |
GetDecimal(String)
Gets the value as a decimal, possibly converting if necessary. This is appropriate for ksqlDB Decimal types, though it should be noted that precision and scale may be lost as this type is parsed as a C# native decimal which does not have arbitrary precision and scale.
Declaration
public decimal GetDecimal(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Decimal | The decimal value for the given key |
GetDouble(String)
Gets the value as a double, possibly converting if necessary.
Declaration
public double GetDouble(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Double | The double value for the given key |
GetInteger(String)
Gets the value as an integer, possibly converting if necessary.
Declaration
public int GetInteger(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Int32 | The integer value for the given key |
GetKsqlDbArray(String)
Gets the value as an array. This is appropriate for ksqlDB List types.
Declaration
public KsqlDbArray GetKsqlDbArray(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
KsqlDbArray | The array value for the given key |
GetKsqlDbObject(String)
Gets the value as an object. This is appropriate for ksqlDB Map and Struct types.
Declaration
public KsqlDbObject GetKsqlDbObject(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
KsqlDbObject | The object value for the given key |
GetLong(String)
Gets the value as a long, possibly converting if necessary.
Declaration
public long GetLong(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Int64 | The long value for the given key |
GetString(String)
Gets the value as a string, possibly converting if necessary.
Declaration
public string GetString(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.String | The string value for the given key |
GetValue(String)
Gets the value in its native type, without any attempt at conversion.
Declaration
public object GetValue(string key)
Parameters
Type | Name | Description |
---|---|---|
System.String | key | The key within the object |
Returns
Type | Description |
---|---|
System.Object | The value for the given key |