Skip to content

Commit e37347c

Browse files
Tigrovvjik
andauthored
Refactor database query selection method (#286)
Co-authored-by: Sergei Predvoditelev <[email protected]>
1 parent e449300 commit e37347c

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

_translations/po/es/guide_start_databases.md.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-12-27 03:24+0000\n"
9+
"POT-Creation-Date: 2025-12-27 06:04+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -449,8 +449,8 @@ msgid ""
449449
"\n"
450450
" public function findOneBySlug(string $slug): ?Page\n"
451451
" {\n"
452-
" $query = (new Query($this->connection))\n"
453-
" ->select('*')\n"
452+
" $query = $this->connection\n"
453+
" ->select()\n"
454454
" ->from('{{%page}}')\n"
455455
" ->where('slug = :slug', ['slug' => $slug]);\n"
456456
"\n"
@@ -462,8 +462,8 @@ msgid ""
462462
" */\n"
463463
" public function findAll(): iterable\n"
464464
" {\n"
465-
" $data = (new Query($this->connection))\n"
466-
" ->select('*')\n"
465+
" $data = $this->connection\n"
466+
" ->select()\n"
467467
" ->from('{{%page}}')\n"
468468
" ->all();\n"
469469
"\n"

_translations/po/id/guide_start_databases.md.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-12-27 03:24+0000\n"
9+
"POT-Creation-Date: 2025-12-27 06:04+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -451,8 +451,8 @@ msgid ""
451451
"\n"
452452
" public function findOneBySlug(string $slug): ?Page\n"
453453
" {\n"
454-
" $query = (new Query($this->connection))\n"
455-
" ->select('*')\n"
454+
" $query = $this->connection\n"
455+
" ->select()\n"
456456
" ->from('{{%page}}')\n"
457457
" ->where('slug = :slug', ['slug' => $slug]);\n"
458458
"\n"
@@ -464,8 +464,8 @@ msgid ""
464464
" */\n"
465465
" public function findAll(): iterable\n"
466466
" {\n"
467-
" $data = (new Query($this->connection))\n"
468-
" ->select('*')\n"
467+
" $data = $this->connection\n"
468+
" ->select()\n"
469469
" ->from('{{%page}}')\n"
470470
" ->all();\n"
471471
"\n"

_translations/po/ru/guide_start_databases.md.po

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
msgid ""
77
msgstr ""
88
"Project-Id-Version: PACKAGE VERSION\n"
9-
"POT-Creation-Date: 2025-12-27 03:24+0000\n"
9+
"POT-Creation-Date: 2025-12-27 06:04+0000\n"
1010
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
1111
"Last-Translator: Automatically generated\n"
1212
"Language-Team: none\n"
@@ -454,8 +454,8 @@ msgid ""
454454
"\n"
455455
" public function findOneBySlug(string $slug): ?Page\n"
456456
" {\n"
457-
" $query = (new Query($this->connection))\n"
458-
" ->select('*')\n"
457+
" $query = $this->connection\n"
458+
" ->select()\n"
459459
" ->from('{{%page}}')\n"
460460
" ->where('slug = :slug', ['slug' => $slug]);\n"
461461
"\n"
@@ -467,8 +467,8 @@ msgid ""
467467
" */\n"
468468
" public function findAll(): iterable\n"
469469
" {\n"
470-
" $data = (new Query($this->connection))\n"
471-
" ->select('*')\n"
470+
" $data = $this->connection\n"
471+
" ->select()\n"
472472
" ->from('{{%page}}')\n"
473473
" ->all();\n"
474474
"\n"

_translations/pot/guide_start_databases.md.pot

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
10-
"POT-Creation-Date: 2025-12-27 03:24+0000\n"
10+
"POT-Creation-Date: 2025-12-27 06:04+0000\n"
1111
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1212
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1313
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -491,8 +491,8 @@ msgid ""
491491
"\n"
492492
" public function findOneBySlug(string $slug): ?Page\n"
493493
" {\n"
494-
" $query = (new Query($this->connection))\n"
495-
" ->select('*')\n"
494+
" $query = $this->connection\n"
495+
" ->select()\n"
496496
" ->from('{{%page}}')\n"
497497
" ->where('slug = :slug', ['slug' => $slug]);\n"
498498
"\n"
@@ -504,8 +504,8 @@ msgid ""
504504
" */\n"
505505
" public function findAll(): iterable\n"
506506
" {\n"
507-
" $data = (new Query($this->connection))\n"
508-
" ->select('*')\n"
507+
" $data = $this->connection\n"
508+
" ->select()\n"
509509
" ->from('{{%page}}')\n"
510510
" ->all();\n"
511511
"\n"

src/es/guide/start/databases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ final readonly class PageRepository
305305
306306
public function findOneBySlug(string $slug): ?Page
307307
{
308-
$query = (new Query($this->connection))
309-
->select('*')
308+
$query = $this->connection
309+
->select()
310310
->from('{{%page}}')
311311
->where('slug = :slug', ['slug' => $slug]);
312312
@@ -318,8 +318,8 @@ final readonly class PageRepository
318318
*/
319319
public function findAll(): iterable
320320
{
321-
$data = (new Query($this->connection))
322-
->select('*')
321+
$data = $this->connection
322+
->select()
323323
->from('{{%page}}')
324324
->all();
325325

src/guide/start/databases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ final readonly class PageRepository
294294
295295
public function findOneBySlug(string $slug): ?Page
296296
{
297-
$query = (new Query($this->connection))
298-
->select('*')
297+
$query = $this->connection
298+
->select()
299299
->from('{{%page}}')
300300
->where('slug = :slug', ['slug' => $slug]);
301301
@@ -307,8 +307,8 @@ final readonly class PageRepository
307307
*/
308308
public function findAll(): iterable
309309
{
310-
$data = (new Query($this->connection))
311-
->select('*')
310+
$data = $this->connection
311+
->select()
312312
->from('{{%page}}')
313313
->all();
314314

src/id/guide/start/databases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ final readonly class PageRepository
305305
306306
public function findOneBySlug(string $slug): ?Page
307307
{
308-
$query = (new Query($this->connection))
309-
->select('*')
308+
$query = $this->connection
309+
->select()
310310
->from('{{%page}}')
311311
->where('slug = :slug', ['slug' => $slug]);
312312
@@ -318,8 +318,8 @@ final readonly class PageRepository
318318
*/
319319
public function findAll(): iterable
320320
{
321-
$data = (new Query($this->connection))
322-
->select('*')
321+
$data = $this->connection
322+
->select()
323323
->from('{{%page}}')
324324
->all();
325325

src/ru/guide/start/databases.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ final readonly class PageRepository
305305
306306
public function findOneBySlug(string $slug): ?Page
307307
{
308-
$query = (new Query($this->connection))
309-
->select('*')
308+
$query = $this->connection
309+
->select()
310310
->from('{{%page}}')
311311
->where('slug = :slug', ['slug' => $slug]);
312312
@@ -318,8 +318,8 @@ final readonly class PageRepository
318318
*/
319319
public function findAll(): iterable
320320
{
321-
$data = (new Query($this->connection))
322-
->select('*')
321+
$data = $this->connection
322+
->select()
323323
->from('{{%page}}')
324324
->all();
325325

0 commit comments

Comments
 (0)