ext-postgresql icon indicating copy to clipboard operation
ext-postgresql copied to clipboard

Swoole coroutine Mysql & PostgreSQL public interfaces

Open jcheron opened this issue 6 years ago • 2 comments

postgreSQL and MySQL coroutines classes seem to have different methods (past parameters, return values, names...) Too bad that these 2 classes allowing to query a database asynchronously do not use a common interface, at least for basic operations (connection, query, execute...).

To use these 2 classes and switch from one to the other within the same project (or framework), it is necessary to recode (in php) some wrapper classes, which is neither good for the time spent, nor for the performances.

But maybe I didn't find the right documentation, I only saw this : https://www.swoole.co.uk/docs/modules/swoole-coroutine-postgres

jcheron avatar Jan 04 '20 02:01 jcheron

English documents are not synchronized, You may need to look at the examples in the Chinese documentation.https://wiki.swoole.com/#/coroutine_client/postgresql

sy-records avatar Mar 03 '20 07:03 sy-records

The Mysql and PostgreSQL classes finally seem to have the same public interface. Thanks @sy-records

jcheron avatar Mar 03 '20 13:03 jcheron