-
Notifications
You must be signed in to change notification settings - Fork 2
Improve ExecuteSql endpoint wrapper #1813
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
packages/components/src/internal/components/domainproperties/dataset/actions.ts
Outdated
Show resolved
Hide resolved
@@ -777,7 +773,7 @@ export function getCrossFolderSelectionResult( | |||
|
|||
return new Promise((resolve, reject) => { | |||
return Ajax.request({ | |||
url: buildURL('experiment', 'getCrossFolderDataSelection.api'), | |||
url: ActionURL.buildURL('experiment', 'getCrossFolderDataSelection.api'), |
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.
just curious: is there a specific reason for moving these to ActionURL.buildURL
? should we be deprecating or removing the buildURL
in ui-components?
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.
When linking to LKS I recommend using ActionURL.buildURL()
as it was purpose-built for that. The other buildURL()
still has utility but mainly just for it's support generation of navigation links where we are linking from within the apps to LKS pages (which is not very often) for user navigation purposes. We could rename the latter but I don't think we should deprecate it since there is not 100% functional overlap.
c0270e4
to
9b99ef4
Compare
Rationale
Introduce a standalone
executeSql()
that is akin toselectRows()
. We have a number of usages ofQuery.executeSql()
that are not going through our wrappers (namelyselectRowsDeprecated()
). This streamlines all of the executeSql calls, gets rid of the awkward patterns inselectRowsDeprecated()
, and allows for reduction of a lot of boilerplate.Related Pull Requests
Changes
executeSql()
and adds it to ourQueryAPIWrapper
.Query.executeSql()
in our apps to use the newexecuteSql()
.selectRowsDeprecated()
that are using the sql parameter to useexecuteSql()
.Query.executeSql()
fromselectRowsDeprecated()
.selectRowsDeprecated()
(better late then never).Query.Command
interface