SqliteChangesetReader Class
Read raw sqlite changeset from disk and enumerate changes. It also optionally let you format change with schema from a db provided.
Implements
Methods
Name | Description | |
---|---|---|
constructor(db: AnyDb): SqliteChangesetReader Protected | ||
close(): void | Close changeset | |
dispose(): void | Dispose this object | |
getChangeValue(columnIndex: number, stage: SqliteValueStage): SqliteValue | Get changed value for a column | |
getChangeValueBinary(columnIndex: number, stage: SqliteValueStage): undefined | "null" | Uint8Array | Get changed binary value for a column | |
getChangeValueDouble(columnIndex: number, stage: SqliteValueStage): undefined | "null" | number | Get changed double value for a column | |
getChangeValueId(columnIndex: number, stage: SqliteValueStage): undefined | "null" | string | Get changed Id value for a column | |
getChangeValueInteger(columnIndex: number, stage: SqliteValueStage): undefined | "null" | number | Get changed integer value for a column | |
getChangeValuesArray(stage: SqliteValueStage): undefined | SqliteValueArray | Get all changed value in current change as array | |
getChangeValuesObject(stage: SqliteValueStage, args: ChangeFormatArgs{}): undefined | SqliteChange | Get change as object and format its content. | |
getChangeValueText(columnIndex: number, stage: SqliteValueStage): undefined | "null" | string | Get changed text value for a column | |
getChangeValueType(columnIndex: number, stage: SqliteValueStage): undefined | DbValueType | Get changed binary value for a column | |
getColumnNames(tableName: string): string[] | Get list of column for a table. | |
getColumnValueType(columnIndex: number, stage: SqliteValueStage): undefined | DbValueType | Get change value type | |
getPrimaryKeyColumnNames(): string[] | Get primary key columns. | |
isColumnValueNull(columnIndex: number, stage: SqliteValueStage): undefined | boolean | Check if change value is null | |
step(): boolean | Move to next change in changeset | |
writeToFile(args: { containsSchemaChanges: boolean, fileName: string, overwriteFile?: boolean }): void | Writes the changeset to a file. | |
openFile(args: { fileName: string } & SqliteChangesetReaderArgs): SqliteChangesetReader Static | Open changeset file from disk | |
openGroup(args: { changesetFiles: string[] } & SqliteChangesetReaderArgs): SqliteChangesetReader Static | Group changeset file into single changeset and open that changeset. | |
openLocalChanges(args: Omit<SqliteChangesetReaderArgs, "db"> & { db: IModelDb, includeInMemoryChanges?: "true" }): SqliteChangesetReader Static | Open local changes in iModel. |
Properties
Name | Type | Description | |
---|---|---|---|
changeIndex Accessor ReadOnly | number | index of current change | |
columnCount Accessor ReadOnly | number | Get count of columns in current change | |
db Readonly | AnyDb | db from where sql schema will be read | |
disableSchemaCheck Accessor ReadOnly | boolean | check if schema check is disabled or not | |
hasRow Accessor ReadOnly | boolean | Check if reader current on a row | |
isIndirect Accessor ReadOnly | boolean | Check if its current change is indirect | |
op Accessor ReadOnly | SqliteChangeOp | Get operation that caused the change | |
primaryKeyValues Accessor ReadOnly | SqliteValueArray | Get primary key value array | |
tableName Accessor ReadOnly | string | Get current change table. |
Defined in
Last Updated: 21 November, 2024
Found something wrong, missing, or unclear on this page?Raise an issue in our repo.