mysql column comments #218 #81

This commit is contained in:
Jan Prochazka
2022-02-10 12:46:00 +01:00
parent c3c63da752
commit 691bb0af4f
8 changed files with 37 additions and 6 deletions

View File

@@ -87,6 +87,7 @@
export let tableInfo;
export let setTableInfo;
export let dbInfo;
export let driver;
export function writable() {
return !!setTableInfo;
@@ -176,7 +177,7 @@
header: 'Default value',
sortable: true,
},
{
driver?.dialect?.columnProperties?.isSparse && {
fieldName: 'isSparse',
header: 'Is Sparse',
sortable: true,
@@ -187,12 +188,17 @@
header: 'Computed Expression',
sortable: true,
},
{
driver?.dialect?.columnProperties?.isPersisted && {
fieldName: 'isPersisted',
header: 'Is Persisted',
sortable: true,
slot: 2,
},
driver?.dialect?.columnProperties?.columnComment && {
fieldName: 'columnComment',
header: 'Comment',
sortable: true,
},
writable()
? {
fieldName: 'actions',

View File

@@ -75,6 +75,7 @@
$: dbInfo = useDatabaseInfo({ conid, database });
$: tableInfoWithPairingId = $tableInfo ? generateTablePairingId($tableInfo) : null;
$: connection = useConnectionInfo({ conid });
$: driver = findEngineDriver($connection, $extensions);
const { editorState, editorValue, setEditorData, clearEditorData } = useEditorData({ tabid });
@@ -108,8 +109,6 @@
}
function doSave(createTableName) {
const driver = findEngineDriver($connection, $extensions);
const { sql, recreates } = getAlterTableScript(
$editorValue.base,
extendTableInfo(fillConstraintNames($editorValue.current, driver.dialect)),
@@ -167,6 +166,7 @@
bind:this={domEditor}
tableInfo={showTable}
dbInfo={$dbInfo}
{driver}
setTableInfo={objectTypeField == 'tables'
? tableInfoUpdater =>
setEditorData(tbl =>