Skip to content

Commit e7d07a1

Browse files
committed
remove comments from generated sql
1 parent b39ad84 commit e7d07a1

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

libs/shared/db-layer/src/query/mysql-query.service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,6 @@ export class MysqlQueryService extends BaseQueryService {
485485
const entryRef = useVars ? '@ENTRY' : this.toSqlValue(newId);
486486

487487
const query =
488-
`-- Copy ${tableName} entry from ${sourceRef} to ${entryRef}\n` +
489488
`DELETE FROM \`${tableName}\` WHERE \`${idField}\` = ${entryRef};\n` +
490489
`CREATE TEMPORARY TABLE temp_copy_table AS\n` +
491490
` SELECT * FROM \`${tableName}\` WHERE \`${idField}\` = ${sourceRef};\n` +
@@ -533,7 +532,6 @@ export class MysqlQueryService extends BaseQueryService {
533532
const selectList = columns.map((col) => (col === idField ? `${entryRef} AS \`${col}\`` : `\`${col}\``)).join(', ');
534533

535534
const query =
536-
`-- Copy ${tableName} entry from ${sourceRef} to ${entryRef}\n` +
537535
`DELETE FROM \`${tableName}\` WHERE \`${idField}\` = ${entryRef};\n` +
538536
`INSERT INTO \`${tableName}\` (${columnList})\n` +
539537
` SELECT ${selectList}\n` +
@@ -556,8 +554,7 @@ export class MysqlQueryService extends BaseQueryService {
556554
const entryRef = useVars ? '@ENTRY' : this.toSqlValue(newId);
557555

558556
// Always include DELETE against the destination entry
559-
let query =
560-
`-- Copy ${tableName} entry from source to ${entryRef}\n` + `DELETE FROM \`${tableName}\` WHERE \`${idField}\` = ${entryRef};\n`;
557+
let query = `DELETE FROM \`${tableName}\` WHERE \`${idField}\` = ${entryRef};\n`;
561558

562559
if (!rows || rows.length === 0) {
563560
// Nothing to insert, return only the delete statement

0 commit comments

Comments
 (0)