MCPcopy Create free account
hub / github.com/bytebase/bytebase / finish

Function finish

frontend/src/react/hooks/useExecuteSQL.ts:310–321  ·  view source on GitHub ↗
(resultSet: SQLResultSetV1)

Source from the content-addressed store, hash-verified

308 changeContextStatus(database.name, context, "EXECUTING");
309
310 const finish = (resultSet: SQLResultSetV1) => {
311 const next = getSQLEditorTabsState().updateDatabaseQueryContext({
312 database: database.name,
313 contextId: context.id,
314 context: { resultSet },
315 });
316 if (!next) {
317 // Ad-hoc context: mirror onto the local object.
318 context.resultSet = resultSet;
319 }
320 changeContextStatus(database.name, context, "DONE");
321 };
322
323 // After the EXECUTING transition, re-read the live context from
324 // the store so the abortController set during the transition is

Callers 1

useExecuteSQLFunction · 0.70

Calls 2

getSQLEditorTabsStateFunction · 0.90
changeContextStatusFunction · 0.85

Tested by

no test coverage detected