Notebooks: Save cell connection name in cell metadata (#13208)

* save connection info in notebook metadata

* update attachTo dropdown based on saved alias

* add setting for saving connection (default=false)

* save/read cell connection name to/from metadata

* get started on toggling multi connection mode

* add activeConnection property to cell model

* add changeContext method for cell

* add comments

* add unit test for reading connection name

* save connection mode in metadata

* clean up code

* address PR comments
This commit is contained in:
Lucy Zhang
2020-11-12 10:44:34 -08:00
committed by GitHub
parent 468119caa4
commit 32a6385fef
5 changed files with 38 additions and 6 deletions

12
src/sql/azdata.d.ts vendored
View File

@@ -4688,17 +4688,19 @@ declare module 'azdata' {
export interface ICellContents {
cell_type: CellType;
source: string | string[];
metadata?: {
language?: string;
tags?: string[];
azdata_cell_guid?: string;
};
metadata?: ICellMetadata;
execution_count?: number;
outputs?: ICellOutput[];
}
export type CellType = 'code' | 'markdown' | 'raw';
export interface ICellMetadata {
language?: string;
tags?: string[];
azdata_cell_guid?: string;
}
export interface ICellOutput {
output_type: OutputTypeName;
metadata?: ICellOutputMetadata;