You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As we have multiple clients (pymgclient, rsmgclient, the nodejs client) it would be nice if they were been implemented in the same way. I think making a C library on top of mgclient is not useful, because of the various differences in the different languages the API and wrapping can be complicated. Therefore I propose to use the same state machine logic for all clients. I think the biggest difference between pymgclient and rsmgclient currently is how the transactions are handled:
for pymgclient there are different states for READY and IN_TRANSACTION
for rsmgclient there is a bool flag that indicates whether the connection is in a transaction or not
The smaller differences are:
in pymgclient in most (if not every) function that changes the state of the connection documents the preconditions (the state and value of some flags, i.e.: autocommit) with asserts. For rsmgclient I think this is not that consistent. Also, the these checks are using blacklisting instead of white listing.
minor differences in naming: Connection::pull_all also fetches the results (pull -> tell the server to prepare some results, fetch -> get the results of a previous pull)
in pymgclient there is different cursor and connection class, while in rsmgclient there is only a connection. I think this is fine and no change is required because of this.
The text was updated successfully, but these errors were encountered:
As we have multiple clients (pymgclient, rsmgclient, the nodejs client) it would be nice if they were been implemented in the same way. I think making a C library on top of mgclient is not useful, because of the various differences in the different languages the API and wrapping can be complicated. Therefore I propose to use the same state machine logic for all clients. I think the biggest difference between pymgclient and rsmgclient currently is how the transactions are handled:
READY
andIN_TRANSACTION
The smaller differences are:
Connection::pull_all
also fetches the results (pull -> tell the server to prepare some results, fetch -> get the results of a previous pull)The text was updated successfully, but these errors were encountered: