-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
QueryTimeout is always overwritten in the QueryHelper.CreateQueryFactory #345
Comments
Hi @Mostafa-Elmoghazi could you please try the latest version, available as pre-release https://www.nuget.org/packages/SqlKata/2.0.2-ci-771 and confirm if this issue persist or not? |
Closing due to no response, feel free to reopen for any further feedback. |
This issue is still present in version 2.3.2 In Query.Extensions.cs the CreateQueryFactory method creates a new QueryFactory from the xQuery, but it doesn't set the timeout on that QueryFactory. |
@ahmad-moussawi Issue still exists in current v2.3.7. In Query.Extensions (line 369) |
Thanks @nicolasfatoux, @Thowk. |
Hello,
I've started using the SqlKata library recently in a data analytical project that depends heavily on dynamic queries. I'me working on very complicated queries that sometimes take a bit long time to execute. I'm facing an issue while setting the timeout of the query on SqlKata. I've set the timeout on the QueryFactory instance I've created to 5000000 but the query still times out. When I looked at the source code of execution library, I found this:
Given the following code:
var db = new QueryFactory(connection, compiler);
db.QueryTimeout = 5000000;
var result = db.Query("ApplicationUsers").Get<dynamic>();
Here Get function calls QueryHelper.CreateQueryFactory which recreate a new QueryFactory instance with QueryTimeout property set to its default 30.
How can I get my own QueryFactory instance execute the query with my set QueryTimeout value and without getting new instance of QueryFactory created?
Note: I'm using the latest stable version v1.1.7
@ahmad-moussawi
The text was updated successfully, but these errors were encountered: