Class Array
Represents a TileDB array object.
Implements
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Array : IDisposable
Constructors
| Edit this page View SourceArray(Context, string)
Creates an Array.
Declaration
public Array(Context ctx, string uri)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context associated with the array. |
string | uri | The array's URI. |
Methods
| Edit this page View SourceClose()
Closes the Array.
Declaration
public void Close()
Config()
Declaration
public Config Config()
Returns
Type | Description |
---|---|
Config |
Consolidate(Context, string, Config?)
Consolidates an array.
Declaration
public static void Consolidate(Context ctx, string uri, Config? config = null)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
Config | config | Configuration parameters for the consolidation. Optional. |
ConsolidateFragments(Context, string, IReadOnlyList<string>, Config?)
Consolidates the given fragments of an array into a single fragment.
Declaration
public static void ConsolidateFragments(Context ctx, string uri, IReadOnlyList<string> fragments, Config? config = null)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
IReadOnlyList<string> | fragments | The names of the fragments to consolidate. They can be retrieved using GetFragmentName(uint). |
Config | config | Configuration parameters for the consolidation. Optional. |
Context()
Declaration
public Context Context()
Returns
Type | Description |
---|---|
Context |
Create(ArraySchema)
Declaration
public void Create(ArraySchema schema)
Parameters
Type | Name | Description |
---|---|---|
ArraySchema | schema | The array's ArraySchema. |
See Also
| Edit this page View SourceCreate(Context, string, ArraySchema)
Creates an Array at a given URI.
Declaration
public static void Create(Context ctx, string uri, ArraySchema schema)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
ArraySchema | schema | The array's schema. |
See Also
| Edit this page View SourceDelete(Context, string)
Deletes an array from storage.
Declaration
public static void Delete(Context ctx, string uri)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
DeleteFragments(Context, string, IReadOnlyList<string>)
Deletes fragments from an array that fall within the given timestamp range.
Declaration
public static void DeleteFragments(Context ctx, string uri, IReadOnlyList<string> fragmentUris)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context() to use. |
string | uri | The URI to the array. |
IReadOnlyList<string> | fragmentUris | A list with the URIs of the fragments to delete. |
DeleteFragments(Context, string, ulong, ulong)
Deletes fragments from an array that fall within the given timestamp range.
Declaration
public static void DeleteFragments(Context ctx, string uri, ulong timestampStart, ulong timestampEnd)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context() to use. |
string | uri | The URI to the array. |
ulong | timestampStart | The start of the timestamp range, inclusive. |
ulong | timestampEnd | The end of the timestamp range, inclusive. |
DeleteMetadata(string)
Deletes a metadata from the Array.
Declaration
public void DeleteMetadata(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | The metadata's ket. |
Dispose()
Disposes the Array.
Declaration
public void Dispose()
EncryptionType(Context, string)
Gets the EncryptionType with which an array was encrypted.
Declaration
public static EncryptionType EncryptionType(Context ctx, string uri)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
Returns
Type | Description |
---|---|
EncryptionType |
Evolve(ArraySchemaEvolution)
Applies an ArraySchemaEvolution to the schema of this Array.
Declaration
public void Evolve(ArraySchemaEvolution schemaEvolution)
Parameters
Type | Name | Description |
---|---|---|
ArraySchemaEvolution | schemaEvolution | The schema evolution to use. |
See Also
| Edit this page View SourceEvolve(Context, string, ArraySchemaEvolution)
Applies an ArraySchemaEvolution to the schema of an array.
Declaration
public static void Evolve(Context ctx, string uri, ArraySchemaEvolution schemaEvolution)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
ArraySchemaEvolution | schemaEvolution | The schema evolution to use. |
See Also
| Edit this page View SourceGetEnumeration(string)
Gets an Enumeration from the Array by name.
Declaration
public Enumeration GetEnumeration(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The enumeration's name. |
Returns
Type | Description |
---|---|
Enumeration |
See Also
| Edit this page View SourceGetMetadata(string)
Gets string-typed metadata from the Array.
Declaration
public string GetMetadata(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | The metadata's key. |
Returns
Type | Description |
---|---|
string |
GetMetadataFromIndex<T>(ulong)
Gets the Array's metadata key and value by index.
Declaration
public (string key, T[] data) GetMetadataFromIndex<T>(ulong index) where T : struct
Parameters
Type | Name | Description |
---|---|---|
ulong | index | The metadata's index. Must be between zero and MetadataNum() minus one. |
Returns
Type | Description |
---|---|
(string key, T[] data) | A tuple with the metadata's key and value. |
Type Parameters
Name | Description |
---|---|
T | The metadata's type. |
GetMetadata<T>(string)
Gets metadata from the Array.
Declaration
public T[] GetMetadata<T>(string key) where T : struct
Parameters
Type | Name | Description |
---|---|---|
string | key | The metadata's key. |
Returns
Type | Description |
---|---|
T[] | An array with the metadata values. |
Type Parameters
Name | Description |
---|---|
T | The metadata's type. |
HasMetadata(string)
Checks whether a metadata with a given key exists in the Array.
Declaration
public (bool has_key, DataType datatype) HasMetadata(string key)
Parameters
Type | Name | Description |
---|---|---|
string | key | The metadata's key |
Returns
Type | Description |
---|---|
(bool has_key, DataType datatype) | A tuple of whether the metadata exists, and its type. |
IsOpen()
Checks whether the Array is open or not.
Declaration
public bool IsOpen()
Returns
Type | Description |
---|---|
bool |
LoadAllEnumerations()
Loads all enumerations of the Array.
Declaration
public void LoadAllEnumerations()
See Also
| Edit this page View SourceLoadArraySchema(Context, string)
Loads the ArraySchema of an array at the given path.
Declaration
public static ArraySchema LoadArraySchema(Context ctx, string path)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | path | The array's path. |
Returns
Type | Description |
---|---|
ArraySchema |
Metadata()
Gets the ArrayMetadata object for this Array.
Declaration
public ArrayMetadata Metadata()
Returns
Type | Description |
---|---|
ArrayMetadata |
MetadataKeys()
Gets the Array's metadata keys.
Declaration
public string[] MetadataKeys()
Returns
Type | Description |
---|---|
string[] |
MetadataNum()
Gets the number of metadata of the Array.
Declaration
public ulong MetadataNum()
Returns
Type | Description |
---|---|
ulong |
NonEmptyDomain()
Gets the non-empty domain of all dimensions of the Array.
Declaration
public (NonEmptyDomain, bool) NonEmptyDomain()
Returns
Type | Description |
---|---|
(NonEmptyDomain, bool) |
NonEmptyDomainVar(string)
Gets the non-empty domain from a variable-sized dimension of the Array, identified by its name.
Declaration
public (string Start, string End, bool IsEmpty) NonEmptyDomainVar(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The dimension's name. |
Returns
Type | Description |
---|---|
(string Start, string End, bool IsEmpty) | The domain's start and end values, along with whether it is empty. |
NonEmptyDomainVar(uint)
Gets the non-empty domain from a variable-sized dimension of the Array, identified by its index.
Declaration
public (string Start, string End, bool IsEmpty) NonEmptyDomainVar(uint index)
Parameters
Type | Name | Description |
---|---|---|
uint | index | The dimension's index. |
Returns
Type | Description |
---|---|
(string Start, string End, bool IsEmpty) | The domain's start and end values, along with whether it is empty. |
NonEmptyDomain<T>(string)
Gets the non-empty domain from a dimension of the Array, identified by its name.
Declaration
public (T Start, T End, bool IsEmpty) NonEmptyDomain<T>(string name) where T : struct
Parameters
Type | Name | Description |
---|---|---|
string | name | The dimension's name. |
Returns
Type | Description |
---|---|
(T Start, T End, bool IsEmpty) | The domain's start and end values, along with whether it is empty. |
Type Parameters
Name | Description |
---|---|
T | The dimension's type. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
NonEmptyDomain<T>(uint)
Gets the non-empty domain from a dimension of the Array, identified by its index.
Declaration
public (T Start, T End, bool IsEmpty) NonEmptyDomain<T>(uint index) where T : struct
Parameters
Type | Name | Description |
---|---|---|
uint | index | The dimension's index. |
Returns
Type | Description |
---|---|
(T Start, T End, bool IsEmpty) | The domain's start and end values, along with whether it is empty. |
Type Parameters
Name | Description |
---|---|
T | The dimension's type. |
Exceptions
Type | Condition |
---|---|
ArgumentException |
|
Open(QueryType)
Opens the Array.
Declaration
public void Open(QueryType queryType)
Parameters
Type | Name | Description |
---|---|---|
QueryType | queryType | The default query type if Query(Context, Array) is called with this array. |
OpenTimestampEnd()
Sets the ending timestamp to use when Open(QueryType)ing (and Reopen()ing) the Array.
Declaration
public ulong OpenTimestampEnd()
Returns
Type | Description |
---|---|
ulong |
See Also
| Edit this page View SourceOpenTimestampStart()
Gets the starting timestamp to use when Open(QueryType)ing (and Reopen()ing) the Array.
Declaration
public ulong OpenTimestampStart()
Returns
Type | Description |
---|---|
ulong |
See Also
| Edit this page View SourcePutMetadata(string, string)
Puts a string-typed metadata to the Array.
Declaration
public void PutMetadata(string key, string value)
Parameters
Type | Name | Description |
---|---|---|
string | key | THe metadata's key. |
string | value | The metadata's value. |
PutMetadata<T>(string, T)
Puts a single-value metadata to the Array.
Declaration
public void PutMetadata<T>(string key, T v) where T : struct
Parameters
Type | Name | Description |
---|---|---|
string | key | THe metadata's key. |
T | v | The metadata's value. |
Type Parameters
Name | Description |
---|---|
T | The metadata's type. |
PutMetadata<T>(string, T[])
Puts a multi-value metadata to the Array.
Declaration
public void PutMetadata<T>(string key, T[] data) where T : struct
Parameters
Type | Name | Description |
---|---|---|
string | key | THe metadata's key. |
T[] | data | The metadata's value. |
Type Parameters
Name | Description |
---|---|
T | The metadata's type. |
QueryType()
Gets the QueryType with which the Array was Open(QueryType)ed.
Declaration
public QueryType QueryType()
Returns
Type | Description |
---|---|
QueryType |
Reopen()
Reopens the Array.
Declaration
public void Reopen()
Schema()
Gets the Array's ArraySchema.
Declaration
public ArraySchema Schema()
Returns
Type | Description |
---|---|
ArraySchema |
SetConfig(Config)
Declaration
public void SetConfig(Config config)
Parameters
Type | Name | Description |
---|---|---|
Config | config | The config to use |
SetOpenTimestampEnd(ulong)
Sets the ending timestamp to use when Open(QueryType)ing (and Reopen()ing) the Array.
Declaration
public void SetOpenTimestampEnd(ulong timestampEnd)
Parameters
Type | Name | Description |
---|---|---|
ulong | timestampEnd | The ending timestamp, inclusive. |
Remarks
If not set, the default value is MaxValue which signifies the current time.
See Also
| Edit this page View SourceSetOpenTimestampStart(ulong)
Sets the starting timestamp to use when Open(QueryType)ing (and Reopen()ing) the Array.
Declaration
public void SetOpenTimestampStart(ulong timestampStart)
Parameters
Type | Name | Description |
---|---|---|
ulong | timestampStart | The starting timestamp, inclusive. |
Remarks
If not set, the default value is zero.
See Also
| Edit this page View SourceUpgradeVersion(Context, string, Config?)
Upgrades the storage format version of an array.
Declaration
public static void UpgradeVersion(Context ctx, string uri, Config? config = null)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
Config | config | Optional Config to customize the process. |
Uri()
Gets the array's URI.
Declaration
public string Uri()
Returns
Type | Description |
---|---|
string |
Vacuum(Context, string, Config?)
Vacuums an array.
Declaration
public static void Vacuum(Context ctx, string uri, Config? config = null)
Parameters
Type | Name | Description |
---|---|---|
Context | ctx | The Context to use. |
string | uri | The array's URI. |
Config | config | Configuration parameters for the consolidation. Optional. |