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

sqlOperations from private to public #766

Open
kazu697 opened this issue Aug 7, 2023 · 0 comments
Open

sqlOperations from private to public #766

kazu697 opened this issue Aug 7, 2023 · 0 comments

Comments

@kazu697
Copy link

kazu697 commented Aug 7, 2023

Summary

In nrpq.go, where the Postgres DatastoreSegment is being retrieved, the execution of the Truncate query in Postgres is displayed as "Other." The reason for this is that the query named "Truncate" is not registered in sqlOperations within sqlparse.go.

sqlOperations = map[string]*regexp.Regexp{
"select": regexp.MustCompile(`(?is)^.*\sfrom` + tablePattern),
"delete": regexp.MustCompile(`(?is)^.*\sfrom` + tablePattern),
"insert": regexp.MustCompile(`(?is)^.*\sinto?` + tablePattern),
"update": updateRegex,
"call": nil,
"create": nil,
"drop": nil,
"show": nil,
"set": nil,
"exec": nil,
"execute": nil,
"alter": nil,
"commit": nil,
"rollback": nil,
}

Desired Behaviour

it would allow the addition of keys within the project code, thereby enabling the display of queries such as Truncate in DatastoreSegment.

Possible Solution

I would like to propose a change in the visibility of sqlOperations from private to public.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant