-
Notifications
You must be signed in to change notification settings - Fork 83
add note about database name in query log #1980
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
add note about database name in query log #1980
Conversation
|
It looks good, but don't we throw an error as well? |
|
@renetapopova Yes we do, but there has been confusing about why the database field in the log has been |
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.
A tiny editorial suggestion. Otherwise, looks good.
|
|
||
| | database | ||
| | The database name on which the query is run. | ||
| | The database name on which the query is run. This field will be `<none>` if it is not possible to parse and route the query to the correct database. |
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.
| | The database name on which the query is run. This field will be `<none>` if it is not possible to parse and route the query to the correct database. | |
| | The database name on which the query is run. This field will be `<none>` if it is impossible to parse and route the query to the correct database. |
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.
Another editorial suggestion - "route the query to a database" instead of "route a query to the correct database" - I would argue that there might be other reasons a query might not be routed to the user's definition of "correct"!
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.
For some reason it felt wrong to say impossibe (don't ask me why 😄). Would it be okay with the change I made to:
"This field will be <none> if the query cannot be parsed and routed to a database."
|
@LinneaAndersson, in which version do you want this to be published? |
|
Thanks for the documentation updates. The preview documentation has now been torn down - reopening this PR will republish it. |
|
@renetapopova This should be updated for Neo4j 5 (and also in neo4j 25) :) It's nothing new in 5 LTS, it's been there for a long time |
In order to know which database the query is targeting, we do some parsing to find if there is a USE-clause (e.g. `USE db RETURN 1 AS result`). If the parsing fails, we are not able to figure out what database the query should be run at and therefor the field in the log will be <none>. Please let me know if I can improve the documentation with more details, I just don't want to put information to confuse the user even more.
Cherry-picked from #1980 Co-authored-by: LinneaAndersson <[email protected]>
In order to know which database the query is targeting, we do some parsing to find if there is a USE-clause (e.g.
USE db RETURN 1 AS result). If the parsing fails, we are not able to figure out what database the query should be run at and therefor the field in the log will be .Please let me know if I can improve the documentation with more details, I just don't want to put information to confuse the user even more.