Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to check ConnectionPool status? #68

Open
HannesRammer opened this issue May 27, 2016 · 1 comment
Open

how to check ConnectionPool status? #68

HannesRammer opened this issue May 27, 2016 · 1 comment

Comments

@HannesRammer
Copy link

How can i check if a connection pool is connected or if the entered login data is valid or not? when I try to query on a connection pool that has invalid login data the program just hangs up, without any errors

@HannesRammer
Copy link
Author

just to update my question,

If anyone has a nicer way of doint this let me know ;)
currently I am doing it like this.

  1. connect to db
  2. query within try
  3. this way I know if a connection is good

Future serverStatus(conn) async {
try {
conn = await conn.query("SELECT 1");
return result;
} catch (e) {
print(e.toString());
return e.toString();
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant