swoole / ext-postgresql

🐘 Coroutine-based client for PostgreSQL
65 stars 21 forks source link

Swoole coroutine Mysql & PostgreSQL public interfaces #11

Open jcheron opened 4 years ago

jcheron commented 4 years ago

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

sy-records commented 4 years ago

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

jcheron commented 4 years ago

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