Skip to content

🎉 Query Builder Enhancements - #3108

Open
harunollyo wants to merge 5 commits into
devfrom
query-builder
Open

harunollyo wants to merge 5 commits into
devfrom
query-builder

Conversation

@harunollyo

Copy link
Copy Markdown
Collaborator

More methods are added to the Query Builder, with unit test coverage and usage documentation.

Schema Validation

public static function has_table( string $table ): bool;
public static function has_column( string $table, string $column ): bool;
public static function has_columns( string $table, array $columns ): bool;

Row Locking

DB::table( 'tutor_orders' )
	->where( 'id', 101 )
	->lock_for_update()
	->first();

Manual Transaction Handling

public static function begin_transaction(): bool;
public static function commit(): bool;
public static function rollback(): bool;

Automatic Transaction Handling

Commits on success and rolls back if an exception is thrown.

public static function transaction( callable $callback );

@harunollyo
harunollyo requested a review from shewa12 October 22, 2026 07:00
@harunollyo harunollyo self-assigned this Oct 22, 2026
Comment thread core/DB.php Outdated
Comment thread core/DB.php Outdated
@harunollyo
harunollyo requested a review from shewa12 October 27, 2026 10:27
@harunollyo
harunollyo changed the base branch from 4.2.0 to dev October 27, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants