OINO TS
    Preparing search index...

    Class OINODataSourceAbstract

    Base class for database abstraction, implementing methods for connecting, making queries and parsing/formatting data between SQL and serialization formats.

    Index

    Constructors

    Properties

    isConnected: boolean = false
    isValidated: boolean = false

    Methods

    • Coerce a single data value into a form that can safely be passed to the datasource as a bind parameter (as opposed to printCellAsValue, which formats it as an inline SQL literal).

      The default implementation returns the value unchanged. SQL datasources override this to apply driver-specific coercions (e.g. converting Date/boolean for drivers that only accept primitive bind types). Non-SQL datasources (blob, nosql) can ignore it.

      Parameters

      • cellValue: OINODataCell

        data value to bind

      • nativeType: string

        native type name for the table column

      Returns OINODataCell

    • Initialize a data model by getting the SQL schema and populating OINODataFields of the model.

      Parameters

      • api: OINOApi

        api which data model to initialize.

      Returns Promise<void>

    • Print a single data value from serialization using the context of the native data type with the correct SQL escaping.

      Parameters

      • cellValue: OINODataCell

        data from sql results

      • nativeType: string

        native type name for table column

      Returns string

    • Print a column name with correct datasource specific formatting.

      Parameters

      • column: string

        name of the column

      Returns string

    • Print a single string value as valid sql literal

      Parameters

      • sqlString: string

        string value

      Returns string