OINO TS
    Preparing search index...

    Class OINODbApi

    API class with method to process HTTP REST requests.

    Index

    Constructors

    Properties

    datamodel: OINODbDataModel

    API datamodel

    db: OINODb

    API database reference

    hashid: any

    API hashid

    API parameters

    Methods

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

      Parameters

      • method: string

        HTTP verb (uppercase)

      • data: any

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

      • params: OINODbApiRequestParams = API_EMPTY_PARAMS

        HTTP URL parameters as key-value-pairs

      Returns Promise<OINODbApiResult>

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

      Parameters

      • method: string

        HTTP verb (uppercase)

      • id: string

        URL id of the REST request

      • data: any

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

      • params: OINODbApiRequestParams = API_EMPTY_PARAMS

        HTTP URL parameters as key-value-pairs

      Returns Promise<OINODbApiResult>

    • 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