OINO TS
    Preparing search index...

    Class OINONoSqlAzureTable

    Azure Table Storage implementation of OINONoSql.

    Authenticates using an Azure Storage connection string. Connection parameters map as:

    • params.url → table service endpoint, e.g. https://<account>.table.core.windows.net
    • params.table → table name
    • params.connectionStr → Azure Storage connection string (e.g. DefaultEndpointsProtocol=https;AccountName=...)

    Register and use via the factory:

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

    OINONoSqlFactory.registerNoSql("OINONoSqlAzureTable", OINONoSqlAzureTable)

    const nosql = await OINONoSqlFactory.createNoSql({
    type: "OINONoSqlAzureTable",
    url: "https://myaccount.table.core.windows.net",
    table: "myTable",
    connectionStr: process.env.AZURE_STORAGE_CONNECTION_STRING
    })
    const api = await OINONoSqlFactory.createApi(nosql, {
    apiName: "entities",
    tableName: "myTable"
    })

    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

    • unknown
      • OINONoSqlAzureTable
    Index

    Constructors

    Methods

    • Fetch a single entity by its primary key values.

      Parameters

      • primaryKey: string[]

        [partitionKey, rowKey]

      Returns Promise<any>

    • 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