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

driverName not set correctly after PR #36 #45

Open
barooo opened this issue Jul 15, 2022 · 2 comments
Open

driverName not set correctly after PR #36 #45

barooo opened this issue Jul 15, 2022 · 2 comments

Comments

@barooo
Copy link

barooo commented Jul 15, 2022

I'm trying to use the latest version (1.0.1), and in my minimal app that tries to get a connection I'm getting a generic error "Unable to acquire a connection". Currently, driverName is a property on the config object passed to the constructor and knex is not doing anything with that key so driverName is undefined when the super() call happens to Knex.Client.

I can get it to work if I do this:

const db = Knex(config);
db.client.driverName = "snowflake-sdk";
db.client.initializeDriver();
db.client.initializePool(config);

Am I missing something? This was changed in #36 which was recently merged. I have version 1.0.1 of knex and of the dialect.

@danajanezic
Copy link

I just spent many many hours trying to figure out what was going on. This was exactly the issue. Any movement on this?

@barooo
Copy link
Author

barooo commented Oct 25, 2022

I just spent many many hours trying to figure out what was going on. This was exactly the issue. Any movement on this?

I ended up just calling the initialize methods as above when I initialize the db connection. I've got a few other changes in a fork that I haven't yet tried to get merged back in, once I've got some time I'll try to open a PR, I can probably fix this one too.

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

2 participants