mssql-change-tracking
Version:
MS SQL server change tracking functions
19 lines (18 loc) • 1.13 kB
TypeScript
import sql from "mssql";
import { ctTablesStatus } from "./change-tracking-table-status";
declare type CtTableEnableInput = QueryInput & {
pool: sql.ConnectionPool;
};
/** Enable change tracking in Table level */
export declare function ctTableEnable({ pool, tableName, dbName, schema, trackColumnsUpdated, }: CtTableEnableInput): ReturnType<typeof ctTablesStatus>;
declare type QueryInput = {
schema?: string;
dbName?: string;
tableName: string;
/**
* @note When the TRACK_COLUMNS_UPDATED option is set to ON, the SQL Server Database Engine stores extra information about which columns were updated to the internal change tracking table. Column tracking can enable an application to synchronize only those columns that were updated. This can improve efficiency and performance. However, because maintaining column tracking information adds some extra storage overhead, this option is set to OFF by default.
*/
trackColumnsUpdated?: "ON" | "OFF";
};
export declare function ctTableEnableQuery({ schema, dbName, tableName, trackColumnsUpdated, }: QueryInput): string;
export {};