import { Column } from "./column.js"; import Database from "./Database.js"; import { Value } from "./types.js"; export default class Table { readonly name: string; private readonly db; private readonly firstDefinitionPage; private readonly definitionBuffer; private readonly dataPages; /** * Number of rows. */ readonly rowCount: number; /** * Number of columns. */ readonly columnCount: number; private readonly variableColumnCount; private readonly fixedColumnCount; private readonly logicalIndexCount; private readonly realIndexCount; /** * @param name Table name. As this is stored in a MSysObjects, it has to be passed in * @param db * @param firstDefinitionPage The first page of the table definition referenced in the corresponding MSysObject */ constructor(name: string, db: Database, firstDefinitionPage: number); /** * Returns a column definition by its name. * * @param name Name of the column. Case sensitive. */ getColumn(name: string): Column; /** * Returns an ordered array of all column definitions. */ getColumns(): Column[]; private getColumnDefinitions; /** * Returns an ordered array of all column names. */ getColumnNames(): string[]; /** * Returns data from the table. * * @param columns Columns to be returned. Defaults to all columns. * @param rowOffset Index of the first row to be returned. 0-based. Defaults to 0. * @param rowLimit Maximum number of rows to be returned. Defaults to Infinity. */ getData(options?: { columns?: ReadonlyArray; rowOffset?: number; rowLimit?: number; }): TRow[]; private getDataPage; private getRecordOffsets; private getDataFromPage; }