This commit is contained in:
Jan Prochazka
2020-06-18 21:18:30 +02:00
parent ac9bd62ecf
commit cecb88f024
13 changed files with 90 additions and 234 deletions

View File

@@ -1,5 +1,3 @@
import { DbType } from './dbtypes';
export interface NamedObjectInfo {
pureName: string;
schemaName: string;
@@ -41,7 +39,6 @@ export interface ColumnInfo {
isSparse: boolean;
defaultValue: string;
defaultConstraint: string;
commonType?: DbType;
}
export interface DatabaseObjectInfo extends NamedObjectInfo {

View File

@@ -1,66 +0,0 @@
export type DbSizeType = 'small' | 'medium' | 'tiny' | 'long';
export interface DbTypeDatetime {
typeCode: 'datetime';
subType?: 'date' | 'datetime' | 'time' | 'year' | 'interval';
extendedPrecision?: boolean;
hasTimeZone?: boolean;
}
export interface DbTypeBlob {
typeCode: 'blob';
size?: DbSizeType;
isText?: boolean;
isUnicode?: boolean;
isXml?: boolean;
}
export interface DbTypeFloat {
typeCode: 'float';
bytes?: number;
isMoney?: boolean;
}
export interface DbTypeGeneric {
typeCode: 'generic';
sql: string;
}
export interface DbTypeLogical {
typeCode: 'logical';
}
export interface DbTypeNumeric {
typeCode: 'numeric';
precision?: number;
scale?: number;
autoIncrement?: boolean;
}
export interface DbTypeString {
typeCode: 'string';
length?: number;
isUnicode?: boolean;
isBinary?: boolean;
isBit?: boolean;
isVarLength?: boolean;
isBlob?: boolean;
}
export interface DbTypeInt {
typeCode: 'int';
bytes?: number;
autoIncrement?: boolean;
}
export type DbType =
| DbTypeDatetime
| DbTypeBlob
| DbTypeFloat
| DbTypeGeneric
| DbTypeLogical
| DbTypeNumeric
| DbTypeString
| DbTypeInt;
export type DbTypeCode = DbType['typeCode'];