Aura.Sql icon indicating copy to clipboard operation
Aura.Sql copied to clipboard

DB Reconnection

Open roynasser opened this issue 6 years ago • 5 comments

Hi All, I'm looking at aura as a base for replacing some older code in one of my projects.

One of the items we implemented was reconnection, but I see there is nothing mentioned of it in any issues and it isnt in the code. (I have seen some other wrappers that do implement it).

Is there any reason why automatice reconnection isnt implemented? Is there any recommendation on how to implement this? (i.e. using aura as a decorator for a pdo wrapper that just reconnects? extending aura itself?)

Would there be any interest in this if I were to implement it? (if so I'd be willing to submit a pr)

roynasser avatar Jan 28 '19 14:01 roynasser

I think the DB reconnection work is required.

And we can use this method to establish database connection again easily.

peter279k avatar Apr 17 '19 19:04 peter279k

Sorry for late reply. Just noticed the comments here. You may be interested in its predecessor https://github.com/atlasphp/Atlas.Pdo .

harikt avatar May 21 '19 15:05 harikt

Regarding your query, does it really lost the connection ?

I was looking at the api, and have an idea, check whether the getPdo is active or not. Else call disconnect and this will connect again on next query.

harikt avatar May 21 '19 15:05 harikt

@harikt I believe Atlas PDO is the spiritual successor, not the predecessor :)

djmattyg007 avatar May 26 '19 22:05 djmattyg007

Cool.

harikt avatar May 27 '19 03:05 harikt