Skip to content

Commit afdb112

Browse files
committed
refactor: move helper classes to traits in subdirectory
- Convert all *Helpers classes to traits and move to src/helpers/traits/ - Update Db.php facade to use traits instead of static class delegation - Remove old helper class files (AggregateHelpers, BooleanHelpers, etc.) - Maintain 100% backward compatibility - all Db::methodName() calls work unchanged - Improve code organization following SOLID principles - All tests pass (478 tests, 2198 assertions) - All examples work on SQLite, MySQL, and PostgreSQL Breaking changes: None Public API: Unchanged QueryBuilder interface: Unchanged
1 parent c509d6b commit afdb112

65 files changed

Lines changed: 1133 additions & 963 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/PdoDb.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Throwable;
1111
use tommyknocker\pdodb\connection\ConnectionFactory;
1212
use tommyknocker\pdodb\connection\ConnectionInterface;
13-
use tommyknocker\pdodb\helpers\RawValue;
13+
use tommyknocker\pdodb\helpers\values\RawValue;
1414
use tommyknocker\pdodb\query\QueryBuilder;
1515

1616
class PdoDb

src/dialects/DialectAbstract.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
use PDO;
99
use RuntimeException;
1010
use SplFileObject;
11-
use tommyknocker\pdodb\helpers\ConcatValue;
12-
use tommyknocker\pdodb\helpers\ConfigValue;
13-
use tommyknocker\pdodb\helpers\RawValue;
11+
use tommyknocker\pdodb\helpers\values\ConcatValue;
12+
use tommyknocker\pdodb\helpers\values\ConfigValue;
13+
use tommyknocker\pdodb\helpers\values\RawValue;
1414
use XMLReader;
1515

1616
abstract class DialectAbstract implements DialectInterface

src/dialects/DialectInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
namespace tommyknocker\pdodb\dialects;
66

77
use PDO;
8-
use tommyknocker\pdodb\helpers\ConcatValue;
9-
use tommyknocker\pdodb\helpers\ConfigValue;
10-
use tommyknocker\pdodb\helpers\RawValue;
8+
use tommyknocker\pdodb\helpers\values\ConcatValue;
9+
use tommyknocker\pdodb\helpers\values\ConfigValue;
10+
use tommyknocker\pdodb\helpers\values\RawValue;
1111

1212
interface DialectInterface
1313
{

src/dialects/MySQLDialect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use InvalidArgumentException;
88
use PDO;
99
use RuntimeException;
10-
use tommyknocker\pdodb\helpers\RawValue;
10+
use tommyknocker\pdodb\helpers\values\RawValue;
1111

1212
class MySQLDialect extends DialectAbstract
1313
{

src/dialects/PostgreSQLDialect.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use InvalidArgumentException;
88
use PDO;
99
use RuntimeException;
10-
use tommyknocker\pdodb\helpers\RawValue;
10+
use tommyknocker\pdodb\helpers\values\RawValue;
1111

1212
class PostgreSQLDialect extends DialectAbstract
1313
{

src/dialects/SqliteDialect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
use InvalidArgumentException;
88
use PDO;
99
use RuntimeException;
10-
use tommyknocker\pdodb\helpers\ConfigValue;
11-
use tommyknocker\pdodb\helpers\RawValue;
10+
use tommyknocker\pdodb\helpers\values\ConfigValue;
11+
use tommyknocker\pdodb\helpers\values\RawValue;
1212

1313
class SqliteDialect extends DialectAbstract
1414
{

0 commit comments

Comments
 (0)