-
Notifications
You must be signed in to change notification settings - Fork 16
Removed query id in prepare statement #60
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
Conversation
src/Session.php
Outdated
@@ -359,7 +359,7 @@ public function query($yql, array $parameters = null) | |||
$query = $this->newQuery($yql) | |||
->parameters($parameters) | |||
->txControl($tx_control) | |||
->keepInCache($this->keep_query_in_cache); | |||
->keepInCache($this->keep_query_in_cache || ($parameters&&count($parameters)>0)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need check about flag keep_query_in_cache exists.
if keep_query_in_cache is null - use autoset of flag (by parameters count)
if keep_query_in_cache is not null - use value of the flag, without check parameters count.
src/Session.php
Outdated
@@ -416,20 +416,11 @@ public function prepare($yql) | |||
{ | |||
$statement = new Statement($this, $yql); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove cache will dramatically decreasy perforemance, because SDK will go to server for prepare every time.
I suggest save cache of metadata if any of them need to execute query of replace prepare to stub if nothing need for execute query.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Close #59