OINO TS
    Preparing search index...

    Class OINONoSqlApi

    REST API for NoSQL table storage.

    Supports the following HTTP methods:

    • GET without id – lists all entities and returns metadata as JSON.
    • GET with id – returns a single entity.
    • POST / PUT with id – upserts an entity; body must be a JSON object with a properties key containing the custom entity properties.
    • DELETE with id – deletes the named entity.

    The URL row ID format uses OINOConfig.OINO_ID_SEPARATOR to join the primary key field values, matching the number and order of primary key fields in the data model (same _OINOID_ convention as OINODbApi).

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    datamodel: OINODataModel = null

    API datamodel

    datasource: OINODataSource

    API database reference

    hashid: OINOHashid

    API hashid

    initialized: boolean = false

    Is API initialized

    noSql: OINONoSql

    NoSQL storage backend

    noSqlDatamodel: OINONoSqlDataModel = null

    NoSQL-specific data model (populated by initializeDatamodel)

    API parameters

    Methods

    • Method for handling a HTTP REST request with GET, POST, PUT, DELETE corresponding to SQL select, insert, update and delete.

      Parameters

      • method: string

        HTTP method of the REST request

      • rowId: string

        URL id of the REST request

      • rowData: OINOApiData

        HTTP body data as either serialized string or unserialized JS object or OINODataRow-array or Buffer/Uint8Array binary data

      • queryParams: OINOQueryParams

        SQL parameters for the REST request

      • contentType: OINOContentType = OINOContentType.json

        content type of the HTTP body data, default is JSON

      Returns Promise<OINOApiResult>

    • Method to check if a field is included in the API params.

      Parameters

      • fieldName: string

        name of the field

      Returns boolean

    • Enable or disable debug output on errors.

      Parameters

      • debugOnError: boolean

        true to enable debug output on errors, false to disable

      Returns void