Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IQueryBuilder

Class for building a certain type of query (insert / upsert / update / delete / select / find) for an API Connection.

Hierarchy

  • IQueryBuilder

Index

Methods

delete

  • Creates a delete query for one or more tables of an API connection.

    Parameters

    • table: string | ITable

      The name of the table to delete the record from.

    • Optional filter: Filter

      The filter condition for the table.

    Returns QueryDelete

find

  • Find a record in the table that satisfy the query conditions.

    Parameters

    • table: string | ITable

      The name of the table to select the records from.

    • filter: Filter

      The filter condition for the table.

    • Optional mode: FindMode

    Returns Promise<IBuffer>

insert

  • Creates an insert query for one table of an API connection.

    since

    1.1.0

    Parameters

    • table: string | ITable

      The name of the table to create a new record into.

    • values: Record

      The field values to set when the query is executed.

    Returns QueryInsert

select

  • Creates a select query for one or more tables of an API connection.

    Parameters

    • table: string | ITable

      The name of the table to select the records from.

    • Optional filter: Filter

      The filter condition for the table.

    • Optional offset: number
    • Optional limit: number

    Returns QuerySelect

update

  • Creates an update query for one or more tables of an API connection.

    since

    1.1.0

    Parameters

    • table: string | ITable

      The name of the table to update records from.

    • values: Record
    • Optional filter: Filter

    Returns QueryUpdate

upsert

  • Creates an upsert query for one table of an API connection.

    since

    1.1.0

    Parameters

    • table: string | ITable

      The name of the table to update or create a new record into.

    • values: Record

      The field values to set when the query is executed.

    Returns QueryUpsert