migrating to typescript
This commit is contained in:
parent
92126dcf0c
commit
6ee6a047b6
|
@ -40,10 +40,14 @@ async function getColumnTypes(testSchemaProcessor: TestSchemaProcessor): Promise
|
|||
logTitle,
|
||||
sql,
|
||||
DBVendors.PG,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
if (result.error) {
|
||||
testSchemaProcessor.processFatalError(result.error);
|
||||
}
|
||||
|
||||
return result.data.rows;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,14 @@ async function retrieveData(testSchemaProcessor: TestSchemaProcessor): Promise<a
|
|||
logTitle,
|
||||
sql,
|
||||
DBVendors.PG,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
if (result.error) {
|
||||
testSchemaProcessor.processFatalError(result.error);
|
||||
}
|
||||
|
||||
return result.data.rows[0];
|
||||
}
|
||||
|
||||
|
|
|
@ -37,10 +37,14 @@ async function hasSchemaCreated(testSchemaProcessor: TestSchemaProcessor): Promi
|
|||
logTitle,
|
||||
sql,
|
||||
DBVendors.PG,
|
||||
true,
|
||||
false,
|
||||
false
|
||||
);
|
||||
|
||||
if (result.error) {
|
||||
testSchemaProcessor.processFatalError(result.error);
|
||||
}
|
||||
|
||||
return !!result.data.rows[0].exists;
|
||||
}
|
||||
|
||||
|
|
|
@ -61,9 +61,9 @@ export default class TestSchemaProcessor {
|
|||
/**
|
||||
* Stops the process in case of fatal error.
|
||||
*/
|
||||
public processFatalError(conversion: Conversion, error: string): void {
|
||||
public processFatalError(error: string): void {
|
||||
console.log(error);
|
||||
generateError(conversion, error);
|
||||
generateError(<Conversion>this.conversion, error);
|
||||
process.exit();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue