BIM.works SDKs - v3.0.0-beta.168
    Preparing search index...

    Class QueryColumns

    Reads query records through the columns table of their answer (QueryRecords.columns). Read a value by its alias here, never as record[alias]: an alias names a column, and where the value is written is the server's business.

    const walls = await bim.query(models, "GET attribute.Name AS name, quantity.*.NetVolume AS volume WHERE type = IFCWALL");
    const rows = QueryColumns.byLabel(walls); // [{name: {...}, volume: {...}}, ...]
    const volume = QueryColumns.get(walls[0], "volume", walls.columns);
    Index

    Constructors

    Methods

    • The records as objects keyed by column label; a relation's or COLLECT's value as an array of such objects

      Parameters

      • records: readonly unknown[]
      • Optionalcolumns: QueryColumn[] | null

      Returns Record<string, unknown>[]

    • Every value of a column in a record (more than one when its path holds "*" or crosses an array)

      Parameters

      Returns { key: string | null; value: unknown }[]

    • The top level column with this alias, else this label, else this text

      Parameters

      Returns QueryColumn | undefined

    • The value of the column called name (QueryColumns.find) in a record

      Parameters

      • record: unknown
      • name: string
      • columns: QueryColumn[] | null | undefined

      Returns unknown

    • The columns as a table shows them: one per value, a relation's items as columns of their own

      Parameters

      Returns QueryLeafColumn[]

    • The columns table of an answer: records.columns, or the columns of a raw answer; null when it has none

      Parameters

      • recordsOrAnswer: unknown

      Returns QueryColumn[] | null

    • The value of a column in a record as the server wrote it: undefined when absent, an array when there are several

      Parameters

      Returns unknown