Skip to content

Commit

Permalink
Add a test with escaping leftJoin with an underscore at the beginning
Browse files Browse the repository at this point in the history
  • Loading branch information
msmakouz committed Dec 21, 2023
1 parent d33b9c2 commit d90d802
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/Database/Functional/Driver/Common/Query/SelectQueryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2267,4 +2267,21 @@ public function testFragmentInWhereInClause(): void
$select
);
}

/**
* Issue https://github.com/cycle/database/issues/49
*/
public function testLeftJoinQuoting(): void
{
$select = $this->database
->select()
->from(['users'])
->leftJoin('_1SCONST _1SCONST2(NOLOCK)')
->on('SC3271.ID', '=', '_1SCONST2.OBJID');

$this->assertSameQuery(
'SELECT * FROM {users} LEFT JOIN {_1SCONST} _1SCONST2([NOLOCK]) ON {SC3271}.{ID} = {_1SCONST2}.{OBJID}',
$select
);
}
}

0 comments on commit d90d802

Please sign in to comment.