OINO TS
    Preparing search index...

    Class OINODbApi

    API class with method to process HTTP REST requests.

    Hierarchy

    • unknown
      • OINODbApi
    Index

    Constructors

    • Constructor of API object. NOTE! OINODb.initDatamodel must be called if created manually instead of the factory.

      Parameters

      • db: OINODb

        database for the API

      • params: OINOApiParams

        parameters for the API

      Returns OINODbApi

    Properties

    db: OINODb

    DB reference

    dbDatamodel: OINODbDataModel = null

    DB datamodel reference

    dbParams: OINOApiParams

    DB parameters reference

    Methods

    • Parameters

      • request: OINOApiRequest

      Returns Promise<OINOApiResult>

    • Method for handling a HTTP REST request with batch update using PUT or DELETE methods.

      Parameters

      • request: OINOApiRequest

        HTTP URL parameters as key-value-pairs

      Returns Promise<OINOApiResult>

    • Method for handling a HTTP REST request with batch update using PUT or DELETE methods.

      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

      • OptionalqueryParams: OINOQueryParams

      Returns Promise<OINOApiResult>

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

      Parameters

      • request: OINOHttpRequest

        OINO HTTP request object containing all parameters 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

      Returns Promise<OINOApiResult>

    • 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