Aura.Sql
Aura.Sql copied to clipboard
DB Reconnection
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)
I think the DB reconnection work is required.
And we can use this method to establish database connection again easily.
Sorry for late reply. Just noticed the comments here. You may be interested in its predecessor https://github.com/atlasphp/Atlas.Pdo .
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 I believe Atlas PDO is the spiritual successor, not the predecessor :)
Cool.