Show / Hide Table of Contents

Class Array

Represents a TileDB array object.

Inheritance
object
Array
Implements
IDisposable
Namespace: TileDB.CSharp
Assembly: TileDB.CSharp.dll
Syntax
public sealed class Array : IDisposable

Constructors

| Edit this page View Source

Array(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 Source

Close()

Closes the Array.

Declaration
public void Close()
| Edit this page View Source

Config()

Gets the Config of the Array.

Declaration
public Config Config()
Returns
Type Description
Config
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

Context()

Gets the Context associated with this Array.

Declaration
public Context Context()
Returns
Type Description
Context
| Edit this page View Source

Create(ArraySchema)

Creates the Array at Uri().

Declaration
public void Create(ArraySchema schema)
Parameters
Type Name Description
ArraySchema schema

The array's ArraySchema.

See Also
Create(Context, string, ArraySchema)
| Edit this page View Source

Create(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
Create(ArraySchema)
| Edit this page View Source

Delete(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

DeleteMetadata(string)

Deletes a metadata from the Array.

Declaration
public void DeleteMetadata(string key)
Parameters
Type Name Description
string key

The metadata's ket.

| Edit this page View Source

Dispose()

Disposes the Array.

Declaration
public void Dispose()
| Edit this page View Source

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
| Edit this page View Source

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
Evolve(Context, string, ArraySchemaEvolution)
| Edit this page View Source

Evolve(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
Evolve(ArraySchemaEvolution)
| Edit this page View Source

GetEnumeration(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
LoadAllEnumerations()
| Edit this page View Source

GetMetadata(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
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

IsOpen()

Checks whether the Array is open or not.

Declaration
public bool IsOpen()
Returns
Type Description
bool
| Edit this page View Source

LoadAllEnumerations()

Loads all enumerations of the Array.

Declaration
public void LoadAllEnumerations()
See Also
GetEnumeration(string)
| Edit this page View Source

LoadArraySchema(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
| Edit this page View Source

Metadata()

Gets the ArrayMetadata object for this Array.

Declaration
public ArrayMetadata Metadata()
Returns
Type Description
ArrayMetadata
| Edit this page View Source

MetadataKeys()

Gets the Array's metadata keys.

Declaration
public string[] MetadataKeys()
Returns
Type Description
string[]
| Edit this page View Source

MetadataNum()

Gets the number of metadata of the Array.

Declaration
public ulong MetadataNum()
Returns
Type Description
ulong
| Edit this page View Source

NonEmptyDomain()

Gets the non-empty domain of all dimensions of the Array.

Declaration
public (NonEmptyDomain, bool) NonEmptyDomain()
Returns
Type Description
(NonEmptyDomain, bool)
| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

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

T is not the dimension's type.

| Edit this page View Source

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

T is not the dimension's type.

| Edit this page View Source

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.

| Edit this page View Source

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
SetOpenTimestampEnd(ulong)
| Edit this page View Source

OpenTimestampStart()

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
SetOpenTimestampStart(ulong)
| Edit this page View Source

PutMetadata(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

| Edit this page View Source

QueryType()

Gets the QueryType with which the Array was Open(QueryType)ed.

Declaration
public QueryType QueryType()
Returns
Type Description
QueryType
| Edit this page View Source

Reopen()

Reopens the Array.

Declaration
public void Reopen()
| Edit this page View Source

Schema()

Gets the Array's ArraySchema.

Declaration
public ArraySchema Schema()
Returns
Type Description
ArraySchema
| Edit this page View Source

SetConfig(Config)

Sets the Config to the Array.

Declaration
public void SetConfig(Config config)
Parameters
Type Name Description
Config config

The config to use

| Edit this page View Source

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
OpenTimestampEnd()
| Edit this page View Source

SetOpenTimestampStart(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
OpenTimestampStart()
| Edit this page View Source

UpgradeVersion(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.

| Edit this page View Source

Uri()

Gets the array's URI.

Declaration
public string Uri()
Returns
Type Description
string
| Edit this page View Source

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.

Implements

IDisposable
  • Edit this page
  • View Source
In this article
Back to top Copyright © 2018-2023 TileDB Inc.