mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
Enabling Script as Create for SqlOnDemand (#10362)
* Update scriptingUtils.ts * Update scripting.contribution.ts
This commit is contained in:
committed by
GitHub
parent
fc548be2c1
commit
ab374e362a
@@ -34,7 +34,7 @@ const targetDatabaseEngineEditionMap = {
|
|||||||
5: 'SqlAzureDatabaseEdition',
|
5: 'SqlAzureDatabaseEdition',
|
||||||
6: 'SqlDatawarehouseEdition',
|
6: 'SqlDatawarehouseEdition',
|
||||||
7: 'SqlServerStretchEdition',
|
7: 'SqlServerStretchEdition',
|
||||||
11: 'SqlServerSqlOnDemandEdition',
|
11: 'SqlServerOnDemandEdition',
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ MenuRegistry.appendMenuItem(MenuId.DataExplorerContext, {
|
|||||||
id: commands.SCRIPT_AS_CREATE_COMMAND_ID,
|
id: commands.SCRIPT_AS_CREATE_COMMAND_ID,
|
||||||
title: localize('scriptAsCreate', "Script as Create")
|
title: localize('scriptAsCreate', "Script as Create")
|
||||||
},
|
},
|
||||||
when: ContextKeyExpr.and(MssqlNodeContext.CanScriptAsCreateOrDelete, MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString()))
|
when: MssqlNodeContext.CanScriptAsCreateOrDelete
|
||||||
});
|
});
|
||||||
|
|
||||||
// Script as Delete
|
// Script as Delete
|
||||||
@@ -115,10 +115,10 @@ MenuRegistry.appendMenuItem(MenuId.ObjectExplorerItemContext, {
|
|||||||
title: localize('scriptCreate', "Script as Create")
|
title: localize('scriptCreate', "Script as Create")
|
||||||
},
|
},
|
||||||
when: ContextKeyExpr.or(
|
when: ContextKeyExpr.or(
|
||||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('Table'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
TreeNodeContextKey.NodeType.isEqualTo('Table'),
|
||||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('View'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
TreeNodeContextKey.NodeType.isEqualTo('View'),
|
||||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('Schema'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
TreeNodeContextKey.NodeType.isEqualTo('Schema'),
|
||||||
ContextKeyExpr.and(TreeNodeContextKey.NodeType.isEqualTo('User'), MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString())),
|
TreeNodeContextKey.NodeType.isEqualTo('User'),
|
||||||
TreeNodeContextKey.NodeType.isEqualTo('UserDefinedTableType'),
|
TreeNodeContextKey.NodeType.isEqualTo('UserDefinedTableType'),
|
||||||
TreeNodeContextKey.NodeType.isEqualTo('StoredProcedure'),
|
TreeNodeContextKey.NodeType.isEqualTo('StoredProcedure'),
|
||||||
TreeNodeContextKey.NodeType.isEqualTo('AggregateFunction'),
|
TreeNodeContextKey.NodeType.isEqualTo('AggregateFunction'),
|
||||||
@@ -296,7 +296,6 @@ MenuRegistry.appendMenuItem(MenuId.ExplorerWidgetContext, {
|
|||||||
id: commands.ExplorerScriptCreateAction.ID,
|
id: commands.ExplorerScriptCreateAction.ID,
|
||||||
title: commands.ExplorerScriptCreateAction.LABEL
|
title: commands.ExplorerScriptCreateAction.LABEL
|
||||||
},
|
},
|
||||||
when: MssqlNodeContext.EngineEdition.notEqualsTo(DatabaseEngineEdition.SqlOnDemand.toString()),
|
|
||||||
order: 2
|
order: 2
|
||||||
});
|
});
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user