OINO TS
    Preparing search index...

    Class OINONoSqlAzureTable

    Azure Table Storage implementation of OINONoSql.

    Authenticates using either an Azure Storage connection string or a table service endpoint URL combined with a managed identity client id. Connection parameters map as:

    • credentials.url → table service endpoint, e.g. https://<account>.table.core.windows.net
    • credentials.connectionStr → Azure Storage connection string (e.g. DefaultEndpointsProtocol=https;AccountName=...)
    • credentials.clientId → (optional) managed identity client id used with credentials.url
    • params.table → table name

    Register and use via the factory with a connection string:

    import { OINONoSqlFactory } from "@oino-ts/nosql"
    import { OINONoSqlAzureTable } from "@oino-ts/nosql-azure"

    OINONoSqlFactory.registerNoSql("OINONoSqlAzureTable", OINONoSqlAzureTable)

    const nosql = await OINONoSqlFactory.createNoSql({
    type: "OINONoSqlAzureTable",
    table: "myTable",
    credentials: { connectionStr: process.env.AZURE_STORAGE_CONNECTION_STRING }
    })
    const api = await OINONoSqlFactory.createApi(nosql, {
    apiName: "entities",
    tableName: "myTable"
    })

    Or with a service endpoint URL and a managed identity client id:

    const nosql = await OINONoSqlFactory.createNoSql({
    type: "OINONoSqlAzureTable",
    table: "myTable",
    credentials: {
    url: "https://myaccount.table.core.windows.net",
    clientId: process.env.AZURE_MANAGED_IDENTITY_CLIENT_ID
    }
    })

    Set staticPartitionKey in the params to scope all operations to a fixed partition key. This lets multiple logical tables share one physical Azure Table Storage table:

    const nosql = await OINONoSqlFactory.createNoSql({
    type: "OINONoSqlAzureTable",
    url: "https://myaccount.table.core.windows.net",
    table: "sharedTable",
    connectionStr: process.env.AZURE_STORAGE_CONNECTION_STRING,
    staticPartitionKey: "myLogicalTable"
    })

    Filters on partitionKey, rowKey, and timestamp are translated to native Azure Table Storage OData query filter expressions and evaluated server-side. Filters on etag are evaluated in-memory after the listing.

    OData operators supported: eq, ne, lt, le, gt, ge, and, or, not. The like operator is not supported by OData and is evaluated in-memory.

    Hierarchy

    • OINONoSql
      • OINONoSqlAzureTable
    Index

    Constructors

    Methods

    • Initialise the Azure SDK table client. Does not perform any network call.

      Returns Promise<OINOResult>

    • Delete an entity.

      Parameters

      • primaryKey: string[]

        [partitionKey, rowKey]

      Returns Promise<void>

    • Fetch a single entity by its primary key values.

      Parameters

      • primaryKey: string[]

        [partitionKey, rowKey]

      Returns Promise<OINONoSqlEntry>

    • Attach a static OINONoSqlDataModel to the given API, adding all five standard fields.

      Parameters

      • api: OINOApi

        the OINONoSqlApi whose data model is to be initialised

      Returns Promise<void>

    • List entities from the table, applying native OData filtering for partitionKey, rowKey, and timestamp predicates server-side, and performing in-memory evaluation for the remaining predicates.

      Parameters

      • Optionalfilter: OINOQueryFilter

        optional query filter to apply

      Returns Promise<OINONoSqlEntry[]>

    • Batch-upsert using Azure Table Storage transactions. Each transaction is limited to 100 entities that share the same partition key. Entries are grouped by partition key first, then chunked to satisfy the limit.

      Parameters

      • entries: OINONoSqlEntry[]

      Returns Promise<void>

    • Upsert (insert or replace) an entity.

      All fields in entry.properties are written as top-level entity properties in Azure Table Storage.

      Parameters

      • entry: OINONoSqlEntry

        entity to upsert

      Returns Promise<void>

    • Attempt to translate an OINOQueryFilter tree to an Azure Table Storage OData v3 filter expression string.

      Returns undefined for sub-trees that contain untranslatable predicates (e.g. filter on etag, or a like comparison). The caller falls back to in-memory evaluation for those cases.

      Parameters

      • filter: OINOQueryFilter

        filter to translate

      Returns string