MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / getSQLValue

Function getSQLValue

web/pgadmin/misc/properties/ObjectNodeProperties.jsx:138–152  ·  view source on GitHub ↗
(isNew, changedData)

Source from the content-addressed store, hash-verified

136
137 /* Called when switched to SQL tab, promise required */
138 const getSQLValue = (isNew, changedData)=>{
139 const msqlUrl = generateNodeUrl.call(node, treeNodeInfo, 'msql', nodeData, !isNew, node.url_jump_after_node);
140 return new Promise((resolve, reject)=>{
141 api({
142 url: msqlUrl,
143 method: 'GET',
144 params: changedData,
145 }).then((res)=>{
146 resolve(res.data.data);
147 }).catch((err)=>{
148 onError(err);
149 reject(err instanceof Error ? err : Error(gettext('Something went wrong')));
150 });
151 });
152 };
153
154 /* Callback for help button */
155 const onHelp = (isSqlHelp=false, isNew=false)=>{

Callers

nothing calls this directly

Calls 2

gettextFunction · 0.85
onErrorFunction · 0.70

Tested by

no test coverage detected