Skip to content

Commit

Permalink
removed bad awaits
Browse files Browse the repository at this point in the history
  • Loading branch information
Umed Khudoiberdiev committed Feb 26, 2018
1 parent 1830f75 commit ba90fd9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/commands/QueryCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class QueryCommand {
connection = await createConnection(connectionOptions);

// create a query runner and execute query using it
queryRunner = await connection.createQueryRunner("master");
queryRunner = connection.createQueryRunner("master");
console.log(chalk.green("Running query: ") + PlatformTools.highlightSql(argv._[1]));
const queryResult = await queryRunner.query(argv._[1]);
console.log(chalk.green("Query has been executed. Result: "));
Expand Down
2 changes: 1 addition & 1 deletion src/connection/Connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ export class Connection {
* Can be used only after connection to the database is established.
*/
async dropDatabase(): Promise<void> {
const queryRunner = await this.createQueryRunner("master");
const queryRunner = this.createQueryRunner("master");
const schemas = this.entityMetadatas
.filter(metadata => metadata.schema)
.map(metadata => metadata.schema!);
Expand Down
4 changes: 2 additions & 2 deletions src/schema-builder/RdbmsSchemaBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class RdbmsSchemaBuilder implements SchemaBuilder {
* Creates complete schemas for the given entity metadatas.
*/
async build(): Promise<void> {
this.queryRunner = await this.connection.createQueryRunner("master");
this.queryRunner = this.connection.createQueryRunner("master");
await this.createNewDatabases();
await this.queryRunner.startTransaction();
try {
Expand Down Expand Up @@ -85,7 +85,7 @@ export class RdbmsSchemaBuilder implements SchemaBuilder {
* Returns sql queries to be executed by schema builder.
*/
async log(): Promise<(string|{ up: string, down: string })[]> {
this.queryRunner = await this.connection.createQueryRunner("master");
this.queryRunner = this.connection.createQueryRunner("master");
try {
await this.createNewDatabases();
this.tables = await this.loadTableSchemas();
Expand Down

0 comments on commit ba90fd9

Please sign in to comment.