Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-06 Thread Saki Takamachi
> There's been discussion recently about how to deal with incompatibilities > between different PDO drivers, especially now that we can have subclasses per > driver. That may be the way to deal with it. I don't have a major opinion > on the approach, other than all incompatibilities should be

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-06 Thread Larry Garfield
On Tue, Feb 6, 2024, at 2:28 PM, Saki Takamachi wrote: > Hi Larry, > >> I like this proposal. It's a good incremental improvement to PDO. I also >> agree with rollbackTo(), to avoid confusion. > > Thank you, I'm glad to receive your positive feedback. > > It is very difficult to implement these

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-06 Thread Saki Takamachi
Hi Larry, > I like this proposal. It's a good incremental improvement to PDO. I also > agree with rollbackTo(), to avoid confusion. Thank you, I'm glad to receive your positive feedback. It is very difficult to implement these in pdo_odbc because the odbc API does not support savepoint. How

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-05 Thread Larry Garfield
On Mon, Feb 5, 2024, at 1:54 PM, Saki Takamachi wrote: > Hi Kentaro, > > Thank you for your important point. > >> While most databases use `SAVEPOINT [name]`, but: >> >> https://github.com/laravel/framework/blob/v10.43.0/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L453-L456 >> >>

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-05 Thread Saki Takamachi
Hi Kentaro, Thank you for your important point. > While most databases use `SAVEPOINT [name]`, but: > > https://github.com/laravel/framework/blob/v10.43.0/src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php#L453-L456 > > ```php > return 'SAVE TRANSACTION '.$name; > ``` > > SQL Server u

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-05 Thread Kentaro Takeda via internals
Hi Saki, Aside from a few concerns, I think your proposal is very sensible. I have long felt a disconnect that while we have `beginTransaction()`, `commit()`, and `rollback()` methods, there's no equivalent functionality for `SAVEPOINT` in PDO. It seems natural to support these commonly used tran

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-04 Thread Saki Takamachi
Hi Kamil, > Why does this have to be done in PHP? Why can this not be done in SQL? Of course, we can also do it with SQL. Indeed, many frameworks do that. However, if we think about it from that perspective, functions such as `beginTransaction()` and `commit()` can also be executed with SQL, ex

Re: [PHP-DEV] [Proposal] Add `savepoint()` method to PDO

2024-02-04 Thread Kamil Tekiela
Hi Saki, Why does this have to be done in PHP? Why can this not be done in SQL? Also, I am not sure that mysqli implements this properly. It's probably not the best extension to take an example of. Regards, Kamil -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: ht