UNPKG

mysql-live

Version:

Brings the server.publish and client.subscribe for live updates on mysql database. The only one Live Collections.

17 lines (16 loc) 664 B
/// <reference path="../../typings/lodash/lodash.d.ts" /> import Handler from "./Handler"; export interface TableDictionary { [table: string]: string[]; } export default class TableEmmiter { protected handler: Handler; listeningTables: TableDictionary; constructor(handler: Handler); addSubscriptionTo(tableName: string, subName: string): void; listenToTable(tableName: string): void; private onTableRowInsert(tableName, newItem); private onTableRowUpdate(tableName, selector, newItem); private onTableRowRemove(tableName, toBeRemovedCriteria); private checkJoinedAndFetch<T>(table, objRow, serverCollectionOnlyCriteria); }