OINO TS
    Preparing search index...

    Class OINODbMariadb

    Implementation of MariaDb/MySql-database.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    isConnected: boolean = false
    isValidated: boolean = false
    name: string

    Name of the database

    Methods

    • Handle a column schema request. Supports GET (fetch column schema), POST (add column) and DELETE (drop column). PUT is not supported and throws.

      Parameters

      • method: string

        HTTP method of the request (GET, POST, DELETE)

      • tableName: string

        name of the table

      • columnName: string

        name of the column (for GET/DELETE)

      • Optionalbody: string

        request body as JSON string (for POST)

      Returns Promise<OINODbSchemaResult>

    • Handle a table schema request. Supports GET (fetch schema), POST (create table) and DELETE (drop table). PUT is not supported and throws.

      Parameters

      • method: string

        HTTP method of the request (GET, POST, DELETE)

      • tableName: string

        name of the table

      • Optionalbody: string

        request body as JSON string (for POST)

      Returns Promise<OINODbSchemaResult>

    • Initialize a data model for an API by fetching the schema fields (via getSchemaFields) and applying API-level field filtering and date-handling parameters.

      Parameters

      • api: OINODbApi

        api which data model to initialize.

      Returns Promise<void>

    • Print SQL DROP COLUMN statement.

      Parameters

      • tableName: string

        name of the table

      • columnName: string

        name of the column

      Returns string

    • Print SQL select statement with DB specific formatting.

      Parameters

      • tableName: string

        The name of the table to select from.

      • columns: string

        The columns to be selected.

      • values: string

        The values to be inserted.

      • OptionalreturnIdFields: string[]

        the id fields to return if returnIds is true (if supported by the database)

      Returns string

    • Print SQL select statement with DB specific formatting.

      Parameters

      • tableName: string

        The name of the table to select from.

      • columnNames: string

        The columns to be selected.

      • whereCondition: string

        The WHERE clause to filter the results.

      • orderCondition: string

        The ORDER BY clause to sort the results.

      • limitCondition: string

        The LIMIT clause to limit the number of results.

      • groupByCondition: string

        The GROUP BY clause to group the results.

      Returns string