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

deduplicate definition of "function" regex, to eliminate duplication of knowledge #5

Open
uladkasach opened this issue Mar 9, 2020 · 0 comments

Comments

@uladkasach
Copy link
Member

currently, we define regex to extract content from a function in two places:

  • extractTypeDefForSelectExpressions (query)
  • extractTypeDefForInputVariables (query)

so every time we modify what a valid function looks like, we have to modify in both places.

if this occurs regularly or we add a third place where we need this knowledge, we absolutely should generalize that information out into a "getFunctionDefinitionFromSql" utility - which can expose the array of arguments and the function name, satisfying all of our use cases

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

No branches or pull requests

1 participant