Skip to content

Commit

Permalink
Revert "chore: added logs to debug the query method" (#13)
Browse files Browse the repository at this point in the history
* Revert "chore: added logs to debug the query method (#12)"

This reverts commit 2d67b5d.

* fix: updated version
  • Loading branch information
javierdelafuentesales committed Feb 21, 2024
1 parent 2d67b5d commit 911cf6c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 33 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@streamyard/typeorm",
"private": true,
"version": "0.3.16-4-beta",
"version": "0.3.16-4",
"description": "Data-Mapper ORM for TypeScript, ES7, ES6, ES5. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, MongoDB, Spanner databases.",
"license": "MIT",
"readmeFilename": "README.md",
Expand Down
31 changes: 0 additions & 31 deletions src/driver/spanner/SpannerQueryRunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,6 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner {
if (this.isReleased) throw new QueryRunnerAlreadyReleasedError()

try {
this.driver.connection.logger.log(
"info",
"typeorm:query - start",
this,
)
const queryStartTime = +new Date()
await this.connect()
let rawResult:
Expand All @@ -187,11 +182,6 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner {

try {
this.driver.connection.logger.logQuery(query, parameters, this)
this.driver.connection.logger.log(
"info",
"typeorm:query - before run",
this,
)
rawResult = await executor.run({
sql: query,
params: parameters
Expand All @@ -202,18 +192,7 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner {
: undefined,
json: true,
})

this.driver.connection.logger.log(
"info",
"typeorm:query - after run",
this,
)
if (!this.isTransactionActive && !isSelect) {
this.driver.connection.logger.log(
"info",
"typeorm:query -commit",
this,
)
await this.sessionTransaction.commit()
}
} catch (error) {
Expand Down Expand Up @@ -241,11 +220,6 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner {
this,
)

this.driver.connection.logger.log(
"info",
"typeorm:query - preparing result",
this,
)
const result = new QueryResult()

result.raw = rawResult
Expand All @@ -258,11 +232,6 @@ export class SpannerQueryRunner extends BaseQueryRunner implements QueryRunner {
return result.records
}

this.driver.connection.logger.log(
"info",
"typeorm:query - end",
this,
)
return result
} catch (err) {
this.driver.connection.logger.logQueryError(
Expand Down

0 comments on commit 911cf6c

Please sign in to comment.