From 1011f8c8d8560daa8303581d4900c1f6ee5b8ac8 Mon Sep 17 00:00:00 2001 From: Kit Loong Date: Sun, 4 Aug 2024 00:18:15 +0800 Subject: [PATCH] Remove full qualified table name check --- src/Repositories/SQLSrvRepository.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/Repositories/SQLSrvRepository.php b/src/Repositories/SQLSrvRepository.php index 591a0d4..957e7b9 100644 --- a/src/Repositories/SQLSrvRepository.php +++ b/src/Repositories/SQLSrvRepository.php @@ -135,7 +135,7 @@ public function getUserDefinedTypes(): Collection /** * Returns the where clause to filter schema and table name in a query. * - * @param string $table The full qualified name of the table. + * @param string $table The name of the table. * @param string $schemaColumn The name of the column to compare the schema to in the where clause. * @param string $tableColumn The name of the column to compare the table to in the where clause. */ @@ -143,11 +143,6 @@ private function getTableWhereClause(string $table, string $schemaColumn, string { $schema = 'SCHEMA_NAME()'; - if (str_contains($table, '.')) { - [$schema, $table] = explode('.', $table); - $schema = $this->quoteStringLiteral($schema); - } - $table = $this->quoteStringLiteral($table); return sprintf('(%s = %s AND %s = %s)', $tableColumn, $table, $schemaColumn, $schema);