gnablib
Version:
A lean, zero dependency library to provide a useful base for your project.
44 lines (43 loc) • 2.73 kB
TypeScript
/*! Copyright 2023-2024 the gnablib contributors MPL-1.1 */
import { FromBinResult } from '../primitive/FromBinResult.js';
import { DateTimeLocal } from '../datetime/dt.js';
import { ACmd } from './ACmd.js';
import { ColName } from './ColName.js';
import { CreateColDef } from './CreateColDef.js';
import { InsertColDef } from './InsertColDef.js';
import type { TableName } from './TableName.js';
import { CommandCtrl } from './types/Command.js';
export declare abstract class ACmdCtrl extends ACmd {
constructor(userId: number, started: DateTimeLocal, table: TableName, cmd: CommandCtrl);
static fromBinSub(s: DateTimeLocal, cByte: number, u: number, t: TableName, e: number, bin: Uint8Array, len: number, pos: number): FromBinResult<ACmdCtrl>;
}
export declare class CmdCtrlCreate extends ACmdCtrl {
readonly cols: CreateColDef[];
constructor(userId: number, started: DateTimeLocal, table: TableName, ...cols: CreateColDef[]);
toJSON(): Record<string, unknown>;
toBin(): Uint8Array;
static Now(userId: number, table: TableName, ...cols: CreateColDef[]): CmdCtrlCreate;
static fromBinSub(s: DateTimeLocal, cByte: number, u: number, t: TableName, e: number, bin: Uint8Array, len: number, pos: number): FromBinResult<CmdCtrlCreate>;
}
export declare class CmdCtrlInsCols extends ACmdCtrl {
readonly after: ColName | undefined;
readonly cols: InsertColDef[];
constructor(userId: number, started: DateTimeLocal, table: TableName, after: ColName | undefined, ...cols: InsertColDef[]);
toJSON(): Record<string, unknown>;
toBin(): Uint8Array;
static Now(userId: number, table: TableName, after: ColName | undefined, ...cols: InsertColDef[]): CmdCtrlInsCols;
static fromBinSub(s: DateTimeLocal, cByte: number, u: number, t: TableName, e: number, bin: Uint8Array, len: number, pos: number): FromBinResult<CmdCtrlInsCols>;
}
export declare class CmdCtrlRemCols extends ACmdCtrl {
readonly cols: ColName[];
constructor(userId: number, started: DateTimeLocal, table: TableName, ...cols: ColName[]);
toJSON(): Record<string, unknown>;
toBin(): Uint8Array;
static Now(userId: number, table: TableName, ...cols: ColName[]): CmdCtrlRemCols;
static fromBinSub(s: DateTimeLocal, cByte: number, u: number, t: TableName, e: number, bin: Uint8Array, len: number, pos: number): FromBinResult<CmdCtrlRemCols>;
}
export declare class CmdCtrlDrop extends ACmdCtrl {
constructor(userId: number, started: DateTimeLocal, table: TableName);
static Now(userId: number, table: TableName): CmdCtrlDrop;
static fromBinSub(s: DateTimeLocal, cByte: number, u: number, t: TableName, e: number, bin: Uint8Array, len: number, pos: number): FromBinResult<CmdCtrlDrop>;
}