mirror of
https://github.com/apache/superset.git
synced 2026-07-19 05:05:39 +00:00
feat(SIP-95): catalogs in SQL Lab and datasets (#28376)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user