Class Attribute
Represents a TileDB attribute object.
Implements
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Attribute : IDisposable
Constructors
| Edit this page View SourceAttribute(Context, string, DataType)
Creates an Attribute.
Declaration
public Attribute(Context ctx, string name, DataType dataType)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context associated with the attribute. |
string | name | The attribute's name. |
DataType | dataType | The attribute's data type. |
Fields
| Edit this page View SourceVariableSized
This value indicates a variable-sized attribute. It may be returned from CellValNum() and can be passed to SetCellValNum(uint).
Declaration
public const uint VariableSized = 4294967295
Field Value
Type | Description |
---|---|
uint |
Methods
| Edit this page View SourceCellSize()
Gets the cell size of this Attribute.
Declaration
public ulong CellSize()
Returns
Type | Description |
---|---|
ulong |
CellValNum()
Gets the number of values per cell for this attribute.
Declaration
public uint CellValNum()
Returns
Type | Description |
---|---|
uint |
Remarks
For variable-sized attributes the result is VariableSized.
Create<T>(Context, string)
Creates an Attribute.
Declaration
public static Attribute Create<T>(Context ctx, string name)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context associated with the attribute. |
string | name | The attribute's name. |
Returns
Type | Description |
---|---|
Attribute |
Type Parameters
Name | Description |
---|---|
T | The attribute's data type. |
Dispose()
Disposes this Attribute.
Declaration
public void Dispose()
EnumerationName()
Gets the name of the Attribute's enumeration.
Declaration
public string EnumerationName()
Returns
Type | Description |
---|---|
string | A string with the name of the attribute's enumeration, or an empty string if the attribute does not have an enumeration. |
FillValue()
Gets the fill value of the attribute rendered as a string.
Declaration
public string FillValue()
Returns
Type | Description |
---|---|
string |
Exceptions
Type | Condition |
---|---|
NotSupportedException | The attribute is not string-typed. |
FillValueNullable()
Gets the Attribute's fill value as a string.
Declaration
public string FillValueNullable()
Returns
Type | Description |
---|---|
string |
FillValueNullable<T>()
Gets the Attribute's fill value and validity.
Declaration
public Tuple<T[], bool> FillValueNullable<T>() where T : struct
Returns
Type | Description |
---|---|
Tuple<T[], bool> |
Type Parameters
Name | Description |
---|---|
T | The attribute's data type. |
FillValue<T>()
Gets the fill value of the Attribute.
Declaration
public T[] FillValue<T>() where T : struct
Returns
Type | Description |
---|---|
T[] |
Type Parameters
Name | Description |
---|---|
T | The attribute's data type. |
FilterList()
Gets the FilterList of Filters that will be applied to this Attribute.
Declaration
public FilterList FilterList()
Returns
Type | Description |
---|---|
FilterList |
Name()
Get name of the attribute.
Declaration
public string Name()
Returns
Type | Description |
---|---|
string |
Nullable()
Gets whether this Attribute can take null values.
Declaration
public bool Nullable()
Returns
Type | Description |
---|---|
bool |
SetCellValNum(uint)
Sets the number of values per cell for this attribute. For variable-sized attributes the value should be VariableSized.
Declaration
public void SetCellValNum(uint cellValNum)
Parameters
Type | Name | Description |
---|---|---|
uint | cellValNum |
SetEnumerationName(string)
Sets the name of the Attribute's enumeration.
Declaration
public void SetEnumerationName(string enumerationName)
Parameters
Type | Name | Description |
---|---|---|
string | enumerationName |
SetFillValue(string)
Sets the fill value of a variable-sized Attribute to a string.
Declaration
public void SetFillValue(string value)
Parameters
Type | Name | Description |
---|---|---|
string | value | The attribute's fill value. |
SetFillValueNullable(string, bool)
Sets the fill value and validity of a string-typed Attribute.
Declaration
public void SetFillValueNullable(string value, bool valid)
Parameters
Type | Name | Description |
---|---|---|
string | value | The attribute's fill value. |
bool | valid | Whether the fill value will be non-null. |
SetFillValueNullable<T>(T, bool)
Sets the fill value and validity of a nullable Attribute. Used when the attribute is single-valued or all its values are the same.
Declaration
public void SetFillValueNullable<T>(T value, bool valid) where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | value | The attribute's fill value. |
bool | valid | Whether the fill value will be non-null. |
Type Parameters
Name | Description |
---|---|
T | The attribute's data type. |
SetFillValue<T>(T)
Sets the fill value of a nullable Attribute.
Declaration
public void SetFillValue<T>(T value) where T : struct
Parameters
Type | Name | Description |
---|---|---|
T | value | The attribute's fill value. |
Type Parameters
Name | Description |
---|---|
T | The attribute's data type. |
SetFilterList(FilterList)
Sets the FilterList of Filters that will be applied to this Attribute.
Declaration
public void SetFilterList(FilterList filterList)
Parameters
Type | Name | Description |
---|---|---|
FilterList | filterList |
SetNullable(bool)
Sets whether this Attribute can take null values.
Declaration
public void SetNullable(bool nullable)
Parameters
Type | Name | Description |
---|---|---|
bool | nullable |
ToString()
Returns a string that represents the current object.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string | A string that represents the current object. |
Overrides
Type()
Gets the data type of this Attribute.
Declaration
public DataType Type()
Returns
Type | Description |
---|---|
DataType |