intercept / intercept-database

A database library for Intercept
MIT License
14 stars 9 forks source link

Can't check connected state of connection #1

Closed dedmen closed 5 years ago

dedmen commented 5 years ago

DeadlyDaysToday at 15:22 yay, its connecting i do have the problem of it always saying when i check it but it does apparently connect on queries so not something I can use to validate if connection succeeded i guess i'll just have to validate every return and use that

DedmenToday at 15:45 oh.. Right. Because it creates a copy of the connection in the worker thread, so the original never get's a query and never connects.

dedmen commented 5 years ago

DedmenToday at 15:48 I could build something like.. You define eventhandlers on a connection. And when an error happens the eventhandler will be called.

dedmen commented 5 years ago

dbIsConnected now exists and also returns true if worker thread is connected