typescript-mysql-model
Version:
{ "version": "1.2.46", "name": "typescript-mysql-model", "description": "", "main": "index.js", "types": "index.d.ts", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url":
50 lines (49 loc) • 1.26 kB
TypeScript
export interface IDatabaseColumn {
"extra": string;
"default"?: any;
"key": string;
"null": string | boolean;
"type": string;
"field": string;
"enumValues": string[] | null;
"length": number;
"isPrimary": boolean;
"index": number;
}
export interface IDatabaseTable {
[columnName: string]: IDatabaseColumn;
}
export interface ITableDictionary {
[table: string]: IDatabaseTable;
}
export interface IStoredProcedureDictionary {
[sp: string]: IStoredProcedure;
}
export interface IStoredProcedureParameter {
specificName: string;
ordinalPosition: number;
parameterMode: string;
parameterName: string;
dataType: string;
characterMaximumLength: number;
characterOctetLength: number;
numericPrecision: number;
numericScale: number;
datetimePrecision: any;
characterSetName: string;
collationName: string;
dtdIdentifier: string;
specificCatalog: string;
specificSchema: string;
}
export interface IStoredProcedure {
name: string;
parameters: {
[param: string]: IStoredProcedureParameter;
};
}
export interface IDatabaseSchema {
tables: ITableDictionary;
views: ITableDictionary;
storedProcedures: IStoredProcedureDictionary;
}