File tree Expand file tree Collapse file tree 7 files changed +19
-19
lines changed Expand file tree Collapse file tree 7 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -1604,11 +1604,11 @@ abstract public function insertID();
1604
1604
/**
1605
1605
* Generates the SQL for listing tables in a platform-dependent manner.
1606
1606
*
1607
- * @param string $tableName If $tableName is provided will return only this table if exists.
1607
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
1608
1608
*
1609
1609
* @return false|string
1610
1610
*/
1611
- abstract protected function _listTables (bool $ constrainByPrefix = false , string $ tableName = '' );
1611
+ abstract protected function _listTables (bool $ constrainByPrefix = false , ? string $ tableName = null );
1612
1612
1613
1613
/**
1614
1614
* Generates a platform-specific query string so that the column names can be fetched.
Original file line number Diff line number Diff line change @@ -369,13 +369,13 @@ public function escapeLikeStringDirect($str)
369
369
* Generates the SQL for listing tables in a platform-dependent manner.
370
370
* Uses escapeLikeStringDirect().
371
371
*
372
- * @param string $tableName If $tableName is provided will return only this table if exists.
372
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
373
373
*/
374
- protected function _listTables (bool $ prefixLimit = false , string $ tableName = '' ): string
374
+ protected function _listTables (bool $ prefixLimit = false , ? string $ tableName = null ): string
375
375
{
376
376
$ sql = 'SHOW TABLES FROM ' . $ this ->escapeIdentifiers ($ this ->database );
377
377
378
- if (! empty ( $ tableName) ) {
378
+ if ($ tableName !== null ) {
379
379
return $ sql . ' LIKE ' . $ this ->escape ($ tableName );
380
380
}
381
381
Original file line number Diff line number Diff line change @@ -243,13 +243,13 @@ public function affectedRows(): int
243
243
/**
244
244
* Generates the SQL for listing tables in a platform-dependent manner.
245
245
*
246
- * @param string $tableName If $tableName is provided will return only this table if exists.
246
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
247
247
*/
248
- protected function _listTables (bool $ prefixLimit = false , string $ tableName = '' ): string
248
+ protected function _listTables (bool $ prefixLimit = false , ? string $ tableName = null ): string
249
249
{
250
250
$ sql = 'SELECT "TABLE_NAME" FROM "USER_TABLES" ' ;
251
251
252
- if (! empty ( $ tableName) ) {
252
+ if ($ tableName !== null ) {
253
253
return $ sql . ' WHERE "TABLE_NAME" LIKE ' . $ this ->escape ($ tableName );
254
254
}
255
255
Original file line number Diff line number Diff line change @@ -205,13 +205,13 @@ protected function _escapeString(string $str): string
205
205
/**
206
206
* Generates the SQL for listing tables in a platform-dependent manner.
207
207
*
208
- * @param string $tableName If $tableName is provided will return only this table if exists.
208
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
209
209
*/
210
- protected function _listTables (bool $ prefixLimit = false , string $ tableName = '' ): string
210
+ protected function _listTables (bool $ prefixLimit = false , ? string $ tableName = null ): string
211
211
{
212
212
$ sql = 'SELECT "table_name" FROM "information_schema"."tables" WHERE "table_schema" = \'' . $ this ->schema . "' " ;
213
213
214
- if (! empty ( $ tableName) ) {
214
+ if ($ tableName !== null ) {
215
215
return $ sql . ' AND "table_name" LIKE ' . $ this ->escape ($ tableName );
216
216
}
217
217
Original file line number Diff line number Diff line change @@ -184,16 +184,16 @@ public function insertID(): int
184
184
/**
185
185
* Generates the SQL for listing tables in a platform-dependent manner.
186
186
*
187
- * @param string $tableName If $tableName is provided will return only this table if exists.
187
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
188
188
*/
189
- protected function _listTables (bool $ prefixLimit = false , string $ tableName = '' ): string
189
+ protected function _listTables (bool $ prefixLimit = false , ? string $ tableName = null ): string
190
190
{
191
191
$ sql = 'SELECT [TABLE_NAME] AS "name" '
192
192
. ' FROM [INFORMATION_SCHEMA].[TABLES] '
193
193
. ' WHERE '
194
194
. " [TABLE_SCHEMA] = ' " . $ this ->schema . "' " ;
195
195
196
- if (! empty ( $ tableName) ) {
196
+ if ($ tableName !== null ) {
197
197
return $ sql .= ' AND [TABLE_NAME] LIKE ' . $ this ->escape ($ tableName );
198
198
}
199
199
Original file line number Diff line number Diff line change @@ -161,11 +161,11 @@ protected function _escapeString(string $str): string
161
161
/**
162
162
* Generates the SQL for listing tables in a platform-dependent manner.
163
163
*
164
- * @param string $tableName If $tableName is provided will return only this table if exists.
164
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
165
165
*/
166
- protected function _listTables (bool $ prefixLimit = false , string $ tableName = '' ): string
166
+ protected function _listTables (bool $ prefixLimit = false , ? string $ tableName = null ): string
167
167
{
168
- if (! empty ( $ tableName) ) {
168
+ if ($ tableName !== null ) {
169
169
return 'SELECT "NAME" FROM "SQLITE_MASTER" WHERE "TYPE" = \'table \''
170
170
. ' AND "NAME" NOT LIKE \'sqlite!_% \' ESCAPE \'! \''
171
171
. ' AND "NAME" LIKE ' . $ this ->escape ($ tableName );
Original file line number Diff line number Diff line change @@ -180,9 +180,9 @@ public function insertID(): int
180
180
/**
181
181
* Generates the SQL for listing tables in a platform-dependent manner.
182
182
*
183
- * @param string $tableName If $tableName is provided will return only this table if exists.
183
+ * @param null| string $tableName If $tableName is provided will return only this table if exists.
184
184
*/
185
- protected function _listTables (bool $ constrainByPrefix = false , string $ tableName = '' ): string
185
+ protected function _listTables (bool $ constrainByPrefix = false , ? string $ tableName = null ): string
186
186
{
187
187
return '' ;
188
188
}
You can’t perform that action at this time.
0 commit comments