-
-
Notifications
You must be signed in to change notification settings - Fork 233
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow QueryEvent to better detect operations in raw queries
When writing long raw queries, it is common to use multiline strings that can start with various white space characters (\n, \t, space...). E.g. err := handle.NewRaw(` SELECT ... FROM ... LEFT JOIN LATERAL ( ... ) AS sub ON true WHERE ... `).Scan(ctx) In that case, a QueryEvent would report the Operation() as "\n\tSELECT". This commit gives the ability to report "SELECT" instead.
- Loading branch information
1 parent
0b38a1c
commit 8e44735
Showing
2 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters