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

Function getSQLValue

web/pgadmin/static/js/SchemaView/SchemaDialogView.jsx:149–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

147 };
148
149 const getSQLValue = () => {
150 // Called when SQL tab is active.
151 if(!schemaState.isDirty) {
152 return Promise.resolve('-- ' + gettext('No updates.'));
153 }
154
155 if(schemaState.errors.name) {
156 return Promise.resolve('-- ' + gettext('Definition incomplete.'));
157 }
158
159 const changeData = schemaState._changes;
160 /*
161 * Call the passed incoming getSQLValue func to get the SQL
162 * return of getSQLValue should be a promise.
163 */
164 return props.getSQLValue(schemaState.isNew, getForQueryParams(changeData));
165 };
166
167 const getButtonIcon = () => {
168 if(props.customSaveBtnIconType == 'upload') {

Callers 1

SQLTabFunction · 0.70

Calls 2

getForQueryParamsFunction · 0.90
gettextFunction · 0.85

Tested by

no test coverage detected