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

@@ -0,0 +1,27 @@
export function isTypeInteger(dataType) {
return dataType && /int/i.test(dataType);
}
export function isTypeNumeric(dataType) {
return dataType && /numeric|decimal/i.test(dataType);
}
export function isTypeFloat(dataType) {
return dataType && /float|single|double/i.test(dataType);
}
export function isTypeNumber(dataType) {
return isTypeInteger(dataType) || isTypeFloat(dataType) || isTypeNumeric(dataType);
}
export function isTypeString(dataType) {
return dataType && /char/i.test(dataType);
}
export function isTypeLogical(dataType) {
return dataType && /bit|boolean/i.test(dataType);
}
export function isTypeDateTime(dataType) {
return dataType && /date|time/i.test(dataType);
}

View File

@@ -0,0 +1 @@
export * from './commonTypeParser';