feat(SIP-95): catalogs in SQL Lab and datasets (#28376)

This commit is contained in:
Beto Dealmeida
2024-05-08 17:19:36 -04:00
committed by GitHub
parent 07cd1d89d0
commit ce668d46cc
71 changed files with 842 additions and 100 deletions

View File

@@ -109,6 +109,7 @@ export default function sqlLabReducer(state = {}, action) {
remoteId: progenitor.remoteId,
name: t('Copy of %s', progenitor.name),
dbId: action.query.dbId ? action.query.dbId : null,
catalog: action.query.catalog ? action.query.catalog : null,
schema: action.query.schema ? action.query.schema : null,
autorun: true,
sql: action.query.sql,
@@ -180,6 +181,7 @@ export default function sqlLabReducer(state = {}, action) {
if (
xt.dbId === at.dbId &&
xt.queryEditorId === at.queryEditorId &&
xt.catalog === at.catalog &&
xt.schema === at.schema &&
xt.name === at.name
) {
@@ -503,6 +505,18 @@ export default function sqlLabReducer(state = {}, action) {
),
};
},
[actions.QUERY_EDITOR_SET_CATALOG]() {
return {
...state,
...alterUnsavedQueryEditorState(
state,
{
catalog: action.catalog,
},
action.queryEditor.id,
),
};
},
[actions.QUERY_EDITOR_SET_SCHEMA]() {
return {
...state,