mysql-live
Version:
Brings the server.publish and client.subscribe for live updates on mysql database. The only one Live Collections.
30 lines (29 loc) • 1.32 kB
TypeScript
import { Collection, CollectionDictionary } from "./Collection";
import Dispatcher from "./Dispatcher";
import TableEmmiter from "./TableEmmiter";
import Receiver from "./Receiver";
import SocketPassport from "./SocketPassport";
import { LiveStore, SubscriptionsDictionary } from "./LiveStore";
import { MethodStore } from "./MethodStore";
export default class Handler {
nsp: SocketIO.Namespace;
collections: CollectionDictionary;
methods: MethodStore;
dispatcher: Dispatcher;
receiver: Receiver;
store: LiveStore;
passport: SocketPassport;
tableEmmiter: TableEmmiter;
db: NodeMysqlWrapper.Database;
constructor(nsp: SocketIO.Namespace, db: NodeMysqlWrapper.Database);
getCollection(collectionName: string): Collection;
getCollectionsByTable(tableName: string): Collection[];
getCollectionsByPrimaryKey(primaryKeyColumnName: string): Collection[];
_registerCollection(collection: Collection): void;
registerCollection(collectionName: string, tableName: string, isSingleItem?: boolean): Collection;
getSocket(socketId: string | SocketIO.Socket): SocketIO.Socket;
isProcedureCursor(cursor: any): boolean;
isFindCursor(cursor: any): boolean;
subscriptions: SubscriptionsDictionary;
}
export declare type onAcknowledgementType = (result?: any) => void;