@dineug/erd-editor 3.10.0 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +316 -147
- package/dist/components/appContext.d.ts +4 -0
- package/dist/components/erd/Erd.d.ts +3 -0
- package/dist/components/erd/automatic-table-placement/AutomaticTablePlacement.d.ts +2 -1
- package/dist/components/erd/automatic-table-placement/createAutomaticTablePlacement.d.ts +38 -2
- package/dist/components/erd/automatic-table-placement/elkPlacement.d.ts +42 -0
- package/dist/components/erd/automatic-table-placement/flowPlacement.d.ts +21 -0
- package/dist/components/erd/automatic-table-placement/placementActions.d.ts +14 -0
- package/dist/components/erd/automatic-table-placement/runElkPlacement.d.ts +0 -11
- package/dist/components/erd/canvas/SceneIcon.template.d.ts +2 -2
- package/dist/components/erd/canvas/entityDrag.d.ts +17 -1
- package/dist/components/erd/canvas/middleButtonPan.d.ts +11 -0
- package/dist/components/erd/canvas/sceneTokens.d.ts +38 -0
- package/dist/components/erd/canvas/table/Table.d.ts +9 -1
- package/dist/components/erd/canvas/table/doubleClick.d.ts +3 -4
- package/dist/components/erd/canvas/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupBody.d.ts +17 -0
- package/dist/components/erd/canvas/table-group/TableGroupDropTarget.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/TableGroupSash.d.ts +35 -0
- package/dist/components/erd/canvas/table-group/TableGroups.d.ts +10 -0
- package/dist/components/erd/canvas/table-group/tableGroupBox.d.ts +40 -0
- package/dist/components/erd/canvas/table-group/titleLayout.d.ts +45 -0
- package/dist/components/erd/canvas/useMoveEntity.d.ts +2 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.d.ts +16 -0
- package/dist/components/erd/draw-target/DrawTargetButtons.styles.d.ts +14 -0
- package/dist/components/erd/draw-target/drawTargetState.d.ts +26 -0
- package/dist/components/erd/draw-target/findDrawTarget.d.ts +29 -0
- package/dist/components/erd/draw-target/placePill.d.ts +49 -0
- package/dist/components/erd/erd-context-menu/ErdContextMenu.d.ts +6 -0
- package/dist/components/erd/erd-context-menu/menus/drawRelationshipMenus.d.ts +3 -0
- package/dist/components/erd/erd-context-menu/menus/exportMenus.d.ts +7 -2
- package/dist/components/erd/erd-context-menu/menus/importMenus.d.ts +5 -1
- package/dist/components/erd/erd-context-menu/menus/relationshipMenus.d.ts +6 -2
- package/dist/components/erd/erd-context-menu/menus/showMenus.d.ts +3 -1
- package/dist/components/erd/erd-context-menu/menus/tablePlacementMenus.d.ts +3 -0
- package/dist/components/erd/floating-toolbar/ToolbarCompass.template.d.ts +3 -1
- package/dist/components/erd/hitTest.d.ts +16 -1
- package/dist/components/erd/minimap/MinimapScene.d.ts +1 -1
- package/dist/components/erd/minimap/table/Table.d.ts +3 -3
- package/dist/components/erd/minimap/table-group/TableGroup.d.ts +17 -0
- package/dist/components/erd/table-group/TableGroupDraft.d.ts +15 -0
- package/dist/components/erd/table-group/TableGroupDraft.styles.d.ts +6 -0
- package/dist/components/erd/table-group/tableGroupName.d.ts +21 -0
- package/dist/components/erd/table-group/useTableGroupDraw.d.ts +25 -0
- package/dist/components/erd/table-properties/TableProperties.styles.d.ts +2 -2
- package/dist/components/erd/table-properties/table-properties-indexes/indexes-key/IndexesKey.d.ts +6 -0
- package/dist/components/erd/table-properties/table-properties-tabs/TablePropertiesTabs.d.ts +3 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.d.ts +17 -0
- package/dist/components/erd/welcome-screen/WelcomeScreen.styles.d.ts +17 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.d.ts +21 -0
- package/dist/components/erd/welcome-screen/welcome-hints/WelcomeHints.styles.d.ts +14 -0
- package/dist/components/erd/welcome-screen/welcome-hints/hintArrows.d.ts +10 -0
- package/dist/components/erd/welcome-screen/welcomeLayout.d.ts +87 -0
- package/dist/components/erd-editor/ErdEditor.d.ts +66 -6
- package/dist/components/erd-editor/useErdEditorAttachElement.d.ts +14 -1
- package/dist/components/export-image/ExportImage.d.ts +23 -0
- package/dist/components/export-image/ExportImage.styles.d.ts +34 -0
- package/dist/components/export-image/exportImageActions.d.ts +48 -0
- package/dist/components/find-replace/panelLayout.d.ts +4 -1
- package/dist/components/generator-code/GeneratorCode.d.ts +1 -0
- package/dist/components/generator-code/generator-code-context-menu/GeneratorCodeContextMenu.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/columnNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/languageMenus.d.ts +8 -0
- package/dist/components/generator-code/generator-code-context-menu/menus/tableNameCaseMenus.d.ts +3 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.d.ts +17 -0
- package/dist/components/generator-code/generator-code-options/GeneratorCodeOptions.styles.d.ts +5 -0
- package/dist/components/generator-code/generatorCodeView.d.ts +12 -0
- package/dist/components/generator-code/languageSettings.d.ts +14 -0
- package/dist/components/locale-picker/LocalePicker.d.ts +13 -0
- package/dist/components/locale-picker/LocalePicker.styles.d.ts +19 -0
- package/dist/components/localeContext.d.ts +10 -0
- package/dist/components/localized/Localized.d.ts +18 -0
- package/dist/components/map-columns/MapColumnsBody.d.ts +24 -0
- package/dist/components/map-columns/MapColumnsDialog.d.ts +13 -0
- package/dist/components/map-columns/MapColumnsDialog.styles.d.ts +38 -0
- package/dist/components/map-columns/mapColumnsAction.d.ts +13 -0
- package/dist/components/map-columns/nameOf.d.ts +6 -0
- package/dist/components/map-columns/openMapColumns.d.ts +9 -0
- package/dist/components/primitives/code-block/CodeBlock.d.ts +6 -1
- package/dist/components/primitives/code-block/CodeBlock.styles.d.ts +2 -0
- package/dist/components/primitives/color-picker/ColorPicker.d.ts +10 -1
- package/dist/components/primitives/color-picker/ColorPicker.styles.d.ts +25 -0
- package/dist/components/primitives/color-picker/colorModel.d.ts +36 -0
- package/dist/components/primitives/color-picker/presetColors.d.ts +13 -0
- package/dist/components/primitives/color-picker/resolveColor.d.ts +7 -0
- package/dist/components/primitives/context-menu/ContextMenu.d.ts +2 -0
- package/dist/components/primitives/context-menu/context-menu-content/ContextMenuContent.d.ts +1 -0
- package/dist/components/primitives/context-menu/context-menu-content/fitMenu.d.ts +4 -4
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.d.ts +8 -0
- package/dist/components/primitives/context-menu/context-menu-separator/ContextMenuSeparator.styles.d.ts +2 -0
- package/dist/components/primitives/context-menu/menu/Menu.d.ts +2 -0
- package/dist/components/primitives/context-menu/submenu-chevron/SubmenuChevron.d.ts +5 -0
- package/dist/components/primitives/dialog/Dialog.d.ts +21 -0
- package/dist/components/primitives/dialog/Dialog.styles.d.ts +12 -0
- package/dist/components/primitives/highlighted-text/HighlightedText.d.ts +2 -5
- package/dist/components/primitives/icon/icons.d.ts +17 -0
- package/dist/components/primitives/select/Select.d.ts +18 -0
- package/dist/components/primitives/select/Select.styles.d.ts +13 -0
- package/dist/components/primitives/text-input/TextInput.d.ts +2 -0
- package/dist/components/primitives/toast/Toast.d.ts +5 -1
- package/dist/components/primitives/toast/Toast.styles.d.ts +2 -2
- package/dist/components/quick-search/QuickSearch.d.ts +2 -1
- package/dist/components/quick-search/actions.d.ts +40 -5
- package/dist/components/quick-search/hangul.d.ts +16 -10
- package/dist/components/quick-search/paletteQuery.d.ts +5 -4
- package/dist/components/quick-search/scopedActions.d.ts +6 -5
- package/dist/components/schema-sql/SchemaSQL.d.ts +2 -0
- package/dist/components/schema-sql/SchemaSQL.styles.d.ts +7 -0
- package/dist/components/schema-sql/schema-sql-context-menu/SchemaSQLContextMenu.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/bracketMenus.d.ts +3 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/headerMenus.d.ts +29 -0
- package/dist/components/schema-sql/schema-sql-context-menu/menus/statementsMenus.d.ts +27 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.d.ts +24 -0
- package/dist/components/schema-sql/schema-sql-options/SchemaSQLOptions.styles.d.ts +45 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.d.ts +20 -0
- package/dist/components/schema-sql/schema-sql-options/ScriptEditor.styles.d.ts +13 -0
- package/dist/components/schema-sql/schema-sql-options/dropWarning.d.ts +8 -0
- package/dist/components/schema-sql/schemaSQLView.d.ts +71 -0
- package/dist/components/settings/Settings.styles.d.ts +7 -0
- package/dist/components/settings/columnTypeLabels.d.ts +8 -0
- package/dist/components/settings/lockSettingRows.d.ts +16 -0
- package/dist/components/settings/settings-lnb/SettingsLnb.d.ts +3 -0
- package/dist/components/settings/settingsPage.d.ts +10 -0
- package/dist/components/theme-builder/ThemeBuilder.d.ts +9 -1
- package/dist/components/theme-builder/ThemeBuilder.styles.d.ts +8 -5
- package/dist/components/toast-container/openStatusToast.d.ts +29 -0
- package/dist/components/toast-container/openToastWhileRunning.d.ts +1 -1
- package/dist/components/toolbar/Toolbar.d.ts +1 -0
- package/dist/components/visualization/graph-node/GraphNode.d.ts +2 -2
- package/dist/components/visualization/graphPan.d.ts +12 -0
- package/dist/components/visualization/visualizationView.d.ts +2 -2
- package/dist/constants/language.d.ts +1 -1
- package/dist/constants/layout.d.ts +34 -0
- package/dist/constants/open.d.ts +3 -0
- package/dist/constants/schema.d.ts +25 -4
- package/dist/constants/sql/dataType/PostgreSQL.d.ts +2 -1
- package/dist/constants/sql/dataType/SQLite.d.ts +3 -1
- package/dist/engine/actions.d.ts +20 -2
- package/dist/engine/context.d.ts +6 -0
- package/dist/engine/index.js +26 -21
- package/dist/engine/modules/editor/actions.d.ts +10 -2
- package/dist/engine/modules/editor/atom.actions.d.ts +49 -11
- package/dist/engine/modules/editor/generator.actions.d.ts +107 -8
- package/dist/engine/modules/editor/state.d.ts +16 -3
- package/dist/engine/modules/editor/utils/color.d.ts +21 -0
- package/dist/engine/modules/editor/utils/duplicate.d.ts +28 -1
- package/dist/engine/modules/editor/utils/focus.d.ts +16 -0
- package/dist/engine/modules/editor/utils/releaseHidden.d.ts +16 -0
- package/dist/engine/modules/editor/utils/selection.d.ts +12 -0
- package/dist/engine/modules/relationship/actions.d.ts +6 -0
- package/dist/engine/modules/relationship/atom.actions.d.ts +57 -1
- package/dist/engine/modules/relationship/endFlags.d.ts +14 -0
- package/dist/engine/modules/relationship/fkColumns.d.ts +25 -6
- package/dist/engine/modules/relationship/history.d.ts +1 -0
- package/dist/engine/modules/relationship/hooks.d.ts +0 -11
- package/dist/engine/modules/relationship/referenceType.d.ts +12 -0
- package/dist/engine/modules/settings/actions.d.ts +17 -4
- package/dist/engine/modules/settings/atom.actions.d.ts +63 -19
- package/dist/engine/modules/settings/generator.actions.d.ts +7 -0
- package/dist/engine/modules/settings/history.d.ts +1 -0
- package/dist/engine/modules/table/actions.d.ts +8 -0
- package/dist/engine/modules/table/atom.actions.d.ts +31 -0
- package/dist/engine/modules/table/generator.actions.d.ts +3 -3
- package/dist/engine/modules/table/history.d.ts +1 -0
- package/dist/engine/modules/table-column/generator.actions.d.ts +8 -0
- package/dist/engine/modules/table-column/hooks.d.ts +0 -6
- package/dist/engine/modules/table-column/keys.d.ts +14 -0
- package/dist/engine/modules/table-column/utils/dataType.d.ts +19 -1
- package/dist/engine/modules/table-group/actions.d.ts +63 -0
- package/dist/engine/modules/table-group/atom.actions.d.ts +238 -0
- package/dist/engine/modules/table-group/generator.actions.d.ts +111 -0
- package/dist/engine/modules/table-group/history.d.ts +13 -0
- package/dist/engine/peer-store.d.ts +9 -3
- package/dist/engine/replication-store.d.ts +6 -3
- package/dist/engine/rx-operators/groupByStreamActions.d.ts +5 -1
- package/dist/engine/rx-operators/lockIgnoreFilter.d.ts +8 -0
- package/dist/engine/rx-store.d.ts +2 -0
- package/dist/engine/settle.d.ts +9 -0
- package/dist/engine/store-hooks.d.ts +0 -8
- package/dist/erd-editor.umd.js +2100 -4194
- package/dist/hooks/useNavigatorLanguages.d.ts +7 -0
- package/dist/i18n/locales.d.ts +126 -0
- package/dist/i18n/menuLabel.d.ts +12 -0
- package/dist/i18n/messages/ar-SA.d.ts +399 -0
- package/dist/i18n/messages/de-DE.d.ts +375 -0
- package/dist/i18n/messages/en/code.d.ts +17 -0
- package/dist/i18n/messages/en/colorPicker.d.ts +35 -0
- package/dist/i18n/messages/en/common.d.ts +65 -0
- package/dist/i18n/messages/en/contextMenu.d.ts +29 -0
- package/dist/i18n/messages/en/exportImage.d.ts +25 -0
- package/dist/i18n/messages/en/feedback.d.ts +11 -0
- package/dist/i18n/messages/en/findReplace.d.ts +36 -0
- package/dist/i18n/messages/en/floatingToolbar.d.ts +12 -0
- package/dist/i18n/messages/en/index.d.ts +378 -0
- package/dist/i18n/messages/en/mapColumns.d.ts +39 -0
- package/dist/i18n/messages/en/palette.d.ts +40 -0
- package/dist/i18n/messages/en/schemaSql.d.ts +28 -0
- package/dist/i18n/messages/en/settings.d.ts +22 -0
- package/dist/i18n/messages/en/shortcuts.d.ts +32 -0
- package/dist/i18n/messages/en/tableProperties.d.ts +34 -0
- package/dist/i18n/messages/en/themeBuilder.d.ts +7 -0
- package/dist/i18n/messages/en/toolbar.d.ts +9 -0
- package/dist/i18n/messages/en/visualization.d.ts +12 -0
- package/dist/i18n/messages/en/welcome.d.ts +13 -0
- package/dist/i18n/messages/es-ES.d.ts +381 -0
- package/dist/i18n/messages/eu-ES.d.ts +375 -0
- package/dist/i18n/messages/fa-IR.d.ts +375 -0
- package/dist/i18n/messages/fr-FR.d.ts +381 -0
- package/dist/i18n/messages/he-IL.d.ts +381 -0
- package/dist/i18n/messages/id-ID.d.ts +369 -0
- package/dist/i18n/messages/index.d.ts +11 -0
- package/dist/i18n/messages/it-IT.d.ts +381 -0
- package/dist/i18n/messages/ja-JP.d.ts +369 -0
- package/dist/i18n/messages/ko-KR.d.ts +369 -0
- package/dist/i18n/messages/nl-NL.d.ts +375 -0
- package/dist/i18n/messages/pl-PL.d.ts +387 -0
- package/dist/i18n/messages/pt-BR.d.ts +381 -0
- package/dist/i18n/messages/pt-PT.d.ts +381 -0
- package/dist/i18n/messages/ro-RO.d.ts +381 -0
- package/dist/i18n/messages/ru-RU.d.ts +387 -0
- package/dist/i18n/messages/sk-SK.d.ts +387 -0
- package/dist/i18n/messages/sl-SI.d.ts +387 -0
- package/dist/i18n/messages/sv-SE.d.ts +375 -0
- package/dist/i18n/messages/tr-TR.d.ts +375 -0
- package/dist/i18n/messages/uk-UA.d.ts +387 -0
- package/dist/i18n/messages/zh-CN.d.ts +369 -0
- package/dist/i18n/messages/zh-TW.d.ts +369 -0
- package/dist/i18n/resolveLocale.d.ts +11 -0
- package/dist/i18n/source.d.ts +7 -0
- package/dist/i18n/translate.d.ts +58 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +29797 -13894
- package/dist/internal-types/index.d.ts +2 -4
- package/dist/konva/scene/contentBounds.d.ts +18 -12
- package/dist/konva/scene/metrics.d.ts +2 -0
- package/dist/konva/scene/renderScene.d.ts +10 -4
- package/dist/konva/scene/stacking.d.ts +21 -0
- package/dist/konva/scene/viewLayout.d.ts +2 -1
- package/dist/loadValue-B3EFSe9k.js +12925 -0
- package/dist/peer/index.d.ts +6 -3
- package/dist/peer/index.js +83 -76
- package/dist/services/elk-layout/elkGraph.d.ts +6 -4
- package/dist/services/elk-layout/elkLayoutOptions.d.ts +20 -0
- package/dist/services/elk-layout/elkLayoutService.d.ts +3 -3
- package/dist/services/export-png/ExportScene.d.ts +3 -3
- package/dist/services/export-png/documentScene.d.ts +14 -9
- package/dist/services/export-png/exportBox.d.ts +40 -5
- package/dist/services/export-png/exportPngService.d.ts +15 -0
- package/dist/services/export-png/exportTheme.d.ts +26 -0
- package/dist/services/export-png/index.d.ts +44 -11
- package/dist/services/export-png/renderPng.d.ts +18 -10
- package/dist/services/export-png/renderSvg.d.ts +22 -0
- package/dist/services/export-png/sceneSvg.d.ts +54 -0
- package/dist/services/shiki/graphqlGrammar.d.ts +8 -0
- package/dist/shared-store-fUggY7sI.js +1341 -0
- package/dist/themes/radix-ui-theme.d.ts +11 -3
- package/dist/themes/tokens.d.ts +9 -0
- package/dist/utils/calcTable.d.ts +9 -0
- package/dist/utils/clipboard.d.ts +9 -0
- package/dist/utils/collection/tableGroup.entity.d.ts +3 -0
- package/dist/utils/contrastText.d.ts +21 -0
- package/dist/utils/deepMerge.d.ts +8 -0
- package/dist/utils/device-detect/index.d.ts +2 -6
- package/dist/utils/domEvent.d.ts +18 -0
- package/dist/utils/dragSelect.d.ts +2 -0
- package/dist/utils/draw-relationship/bezier.d.ts +2 -0
- package/dist/utils/draw-relationship/corner.d.ts +9 -0
- package/dist/utils/draw-relationship/index.d.ts +18 -18
- package/dist/utils/draw-relationship/loop.d.ts +29 -0
- package/dist/utils/draw-relationship/pathFinding.d.ts +1 -1
- package/dist/utils/draw-relationship/sort.d.ts +8 -1
- package/dist/utils/draw-relationship/stub.d.ts +4 -3
- package/dist/utils/emitter.d.ts +53 -6
- package/dist/utils/file/exportFile.d.ts +15 -5
- package/dist/utils/file/importFile.d.ts +9 -5
- package/dist/utils/file/importSchema.d.ts +45 -0
- package/dist/utils/find-replace/findMatches.d.ts +1 -1
- package/dist/utils/find-replace/present.d.ts +5 -3
- package/dist/utils/generator-code/columnTypes.d.ts +99 -0
- package/dist/utils/generator-code/doctrine.d.ts +6 -0
- package/dist/utils/generator-code/doctrineReservedWords.d.ts +7 -0
- package/dist/utils/generator-code/graphql.d.ts +6 -0
- package/dist/utils/generator-code/heck.d.ts +5 -0
- package/dist/utils/generator-code/java.d.ts +28 -0
- package/dist/utils/generator-code/jsonSchema.d.ts +50 -0
- package/dist/utils/generator-code/jsonShape.d.ts +37 -0
- package/dist/utils/generator-code/kotlin.d.ts +1 -0
- package/dist/utils/generator-code/mermaid.d.ts +5 -0
- package/dist/utils/generator-code/php.d.ts +28 -0
- package/dist/utils/generator-code/rust.d.ts +13 -0
- package/dist/utils/generator-code/rustTypes.d.ts +44 -0
- package/dist/utils/generator-code/scala.d.ts +1 -0
- package/dist/utils/generator-code/seaorm.d.ts +22 -0
- package/dist/utils/generator-code/swift.d.ts +44 -0
- package/dist/utils/generator-code/utils.d.ts +19 -0
- package/dist/utils/generator-code/zod.d.ts +25 -0
- package/dist/utils/globalEventObservable.d.ts +10 -1
- package/dist/utils/highlightWords.d.ts +29 -0
- package/dist/utils/index.d.ts +1 -2
- package/dist/utils/keyboard-shortcut/bindKeys.d.ts +9 -0
- package/dist/utils/keyboard-shortcut/index.d.ts +11 -4
- package/dist/utils/keyboard-shortcut/utils.d.ts +21 -0
- package/dist/utils/map-columns/alignTypes.d.ts +37 -0
- package/dist/utils/map-columns/buildRows.d.ts +102 -0
- package/dist/utils/map-columns/candidateKeys.d.ts +24 -0
- package/dist/utils/map-columns/index.d.ts +8 -0
- package/dist/utils/map-columns/mapping.d.ts +67 -0
- package/dist/utils/map-columns/prefill.d.ts +26 -0
- package/dist/utils/map-columns/toMapColumnsActions.d.ts +10 -0
- package/dist/utils/map-columns/validate.d.ts +45 -0
- package/dist/utils/memo.d.ts +4 -0
- package/dist/utils/schema-aml-parser/types.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/tokenizer.d.ts +2 -0
- package/dist/utils/schema-dbml-parser/types.d.ts +11 -0
- package/dist/utils/schema-sql/Databricks.d.ts +8 -3
- package/dist/utils/schema-sql/MSSQL.d.ts +14 -2
- package/dist/utils/schema-sql/MariaDB.d.ts +6 -5
- package/dist/utils/schema-sql/MySQL.d.ts +13 -4
- package/dist/utils/schema-sql/Oracle.d.ts +19 -5
- package/dist/utils/schema-sql/PostgreSQL.d.ts +16 -4
- package/dist/utils/schema-sql/SQLite.d.ts +16 -4
- package/dist/utils/schema-sql/Snowflake.d.ts +8 -3
- package/dist/utils/schema-sql/index.d.ts +16 -1
- package/dist/utils/schema-sql/options.d.ts +57 -0
- package/dist/utils/schema-sql/utils.d.ts +101 -2
- package/dist/utils/stageCursor.d.ts +20 -0
- package/dist/utils/table-clipboard/placement.d.ts +2 -0
- package/dist/utils/tableColor.d.ts +29 -0
- package/dist/utils/tableGroup.d.ts +142 -0
- package/dist/utils/tableKeys.d.ts +11 -3
- package/dist/workers/elkLayout.shared-worker.js +1 -1
- package/dist/workers/exportPng.shared-worker.js +30 -30
- package/dist/workers/shiki.shared-worker.js +1 -1
- package/dist/workers/spawn.d.ts +1 -2
- package/dist/workers/spawn.inline.d.ts +0 -1
- package/package.json +6 -13
- package/dist/components/generator-code/GeneratorCode.styles.d.ts +0 -2
- package/dist/loadValue-Mdc5K4qO.js +0 -10858
- package/dist/schemaGCService-CZtGFh2z.js +0 -42
- package/dist/services/schema-gc/index.d.ts +0 -18
- package/dist/services/schema-gc/procGC.d.ts +0 -4
- package/dist/services/schema-gc/schemaGC.shared-worker.d.ts +0 -2
- package/dist/services/schema-gc/schemaGCService.d.ts +0 -10
- package/dist/shared-store-D82WVL5a.js +0 -1129
- package/dist/styles/colorPicker.style.d.ts +0 -7
- package/dist/utils/draw-relationship/chamfer.d.ts +0 -3
- package/dist/workers/schemaGC.shared-worker.js +0 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../engine/state';
|
|
3
|
+
import { Column } from '../../internal-types';
|
|
4
|
+
type AlignEnd = {
|
|
5
|
+
tableId: string;
|
|
6
|
+
columnIds: string[];
|
|
7
|
+
};
|
|
8
|
+
export type AlignTypesInput = {
|
|
9
|
+
/** The relationship whose columns change; a new one has none. */
|
|
10
|
+
relationshipId?: string;
|
|
11
|
+
start: AlignEnd;
|
|
12
|
+
end: AlignEnd;
|
|
13
|
+
/** The child columns the same batch adds, which already take the parent's type. */
|
|
14
|
+
newColumnIds: string[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The data type changes that bring each existing child column of the mapping
|
|
18
|
+
* to its parent's, through the data type sync over the relationships as they
|
|
19
|
+
* will stand, while the sync is on; a column already at its value takes none.
|
|
20
|
+
*/
|
|
21
|
+
export declare function toAlignTypeActions(state: RootState, { relationshipId, start, end, newColumnIds }: AlignTypesInput): AnyAction[];
|
|
22
|
+
/**
|
|
23
|
+
* What the dialog says under a row whose child column type differs from the
|
|
24
|
+
* one its parent's gives a foreign key: the type confirming writes there while
|
|
25
|
+
* the sync is on and the parent has one, else both types.
|
|
26
|
+
*/
|
|
27
|
+
export type TypeNote = {
|
|
28
|
+
kind: 'becomes';
|
|
29
|
+
dataType: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'differ';
|
|
32
|
+
parentType: string;
|
|
33
|
+
childType: string;
|
|
34
|
+
};
|
|
35
|
+
export declare function getTypeNote({ settings: { relationshipDataTypeSync, database }, }: Pick<RootState, 'settings'>, parent: Column, child: Column): TypeNote | null;
|
|
36
|
+
export {};
|
|
37
|
+
//# sourceMappingURL=alignTypes.d.ts.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick, MapColumnsDraft, MappingRow } from './mapping';
|
|
5
|
+
import { MappingIssues } from './validate';
|
|
6
|
+
/** The child column picked for each parent column, null where the reader emptied it. */
|
|
7
|
+
export type MapColumnsPicks = Readonly<Record<string, ColumnPick | null>>;
|
|
8
|
+
/** A Map Columns dialog opened while drawing a relationship between two tables. */
|
|
9
|
+
export type CreateMapColumnsSession = {
|
|
10
|
+
mode: 'create';
|
|
11
|
+
startTableId: string;
|
|
12
|
+
endTableId: string;
|
|
13
|
+
relationshipType: number;
|
|
14
|
+
keyId: string | null;
|
|
15
|
+
picks: MapColumnsPicks;
|
|
16
|
+
};
|
|
17
|
+
/** The mapping and the keys a relationship had when the dialog opened on it. */
|
|
18
|
+
export type MapColumnsBase = {
|
|
19
|
+
startColumnIds: string[];
|
|
20
|
+
endColumnIds: string[];
|
|
21
|
+
keyId: string;
|
|
22
|
+
keys: Readonly<Record<string, string[]>>;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* A Map Columns dialog opened on a relationship. Until the reader changes a row
|
|
26
|
+
* or the key it follows the relationship as it stands; after, it keeps the key
|
|
27
|
+
* and the rows they changed, the others still following it.
|
|
28
|
+
*/
|
|
29
|
+
export type EditMapColumnsSession = {
|
|
30
|
+
mode: 'edit';
|
|
31
|
+
relationshipId: string;
|
|
32
|
+
base: MapColumnsBase;
|
|
33
|
+
touched: boolean;
|
|
34
|
+
keyId: string;
|
|
35
|
+
picks: MapColumnsPicks;
|
|
36
|
+
};
|
|
37
|
+
export type MapColumnsSession = CreateMapColumnsSession | EditMapColumnsSession;
|
|
38
|
+
/**
|
|
39
|
+
* A row as the dialog shows it: whether its parent or picked child column has
|
|
40
|
+
* left its table, and the name a new foreign key column takes for it beside
|
|
41
|
+
* the other rows picking one.
|
|
42
|
+
*/
|
|
43
|
+
export type MappingRowView = MappingRow & {
|
|
44
|
+
removedParent: boolean;
|
|
45
|
+
removedChild: boolean;
|
|
46
|
+
newColumnName: string;
|
|
47
|
+
};
|
|
48
|
+
/** The line under a stored mapping no key covers, or one only a key can mend. */
|
|
49
|
+
export type MapColumnsNotice = 'notAKey' | 'noKey' | 'fixMapping' | 'addKeyToFix';
|
|
50
|
+
/** Why the dialog closes on its own: a table it maps between, or the relationship, is gone. */
|
|
51
|
+
export type MapColumnsClosed = {
|
|
52
|
+
reason: 'tableRemoved';
|
|
53
|
+
tableId: string;
|
|
54
|
+
} | {
|
|
55
|
+
reason: 'relationshipRemoved';
|
|
56
|
+
};
|
|
57
|
+
export type MapColumnsView = {
|
|
58
|
+
closed: null;
|
|
59
|
+
parentTable: Table;
|
|
60
|
+
childTable: Table;
|
|
61
|
+
relationshipType: number;
|
|
62
|
+
keys: CandidateKey[];
|
|
63
|
+
keyId: string | null;
|
|
64
|
+
showReferences: boolean;
|
|
65
|
+
rows: MappingRowView[];
|
|
66
|
+
notice: MapColumnsNotice | null;
|
|
67
|
+
changedRemotely: boolean;
|
|
68
|
+
draft: MapColumnsDraft;
|
|
69
|
+
issues: MappingIssues;
|
|
70
|
+
canConfirm: boolean;
|
|
71
|
+
};
|
|
72
|
+
export type MapColumnsClosedView = {
|
|
73
|
+
closed: MapColumnsClosed;
|
|
74
|
+
};
|
|
75
|
+
type MapState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
|
|
76
|
+
/**
|
|
77
|
+
* What the dialog shows for its session over the state as it stands, built
|
|
78
|
+
* again on every render, or why it closes: a table it maps between, or the
|
|
79
|
+
* relationship it edits, has left the document.
|
|
80
|
+
*/
|
|
81
|
+
export declare function buildMapColumns(state: MapState, session: MapColumnsSession): MapColumnsView | MapColumnsClosedView;
|
|
82
|
+
/**
|
|
83
|
+
* A dialog opened to map the start table's key onto the end table's columns:
|
|
84
|
+
* on the primary key, or the first unique column without one, each row a
|
|
85
|
+
* column of the end table only one name match points at, or empty.
|
|
86
|
+
*/
|
|
87
|
+
export declare function openCreateSession(state: MapState, { startTableId, endTableId, relationshipType, }: Pick<CreateMapColumnsSession, 'startTableId' | 'endTableId' | 'relationshipType'>): CreateMapColumnsSession;
|
|
88
|
+
/** A dialog opened on the relationship, remembering its mapping and the parent's keys. */
|
|
89
|
+
export declare function openEditSession(state: MapState, relationshipId: string): EditMapColumnsSession;
|
|
90
|
+
/**
|
|
91
|
+
* The session once the reader picks another key in References: a row for each
|
|
92
|
+
* of its columns keeps the child it had where that child is live, and an empty
|
|
93
|
+
* row takes the one column a name match points at, if any.
|
|
94
|
+
*/
|
|
95
|
+
export declare const changeMapColumnsKey: <S extends MapColumnsSession>(state: MapState, session: S, keyId: string) => S;
|
|
96
|
+
/**
|
|
97
|
+
* The session once the reader picks a child column for a row, or empties it,
|
|
98
|
+
* on the key the dialog shows, which an edit keeps from then on.
|
|
99
|
+
*/
|
|
100
|
+
export declare const pickMapColumn: <S extends MapColumnsSession>(state: MapState, session: S, parentColumnId: string, pick: ColumnPick | null) => S;
|
|
101
|
+
export {};
|
|
102
|
+
//# sourceMappingURL=buildRows.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { ColumnKey } from '../tableKeys';
|
|
4
|
+
/** The References choice that keeps a stored mapping no key of the parent covers. */
|
|
5
|
+
export declare const CURRENT_KEY_ID = "current";
|
|
6
|
+
/** A key a mapping can reference, or the stored columns kept as they are. */
|
|
7
|
+
export type CandidateKey = {
|
|
8
|
+
id: string;
|
|
9
|
+
kind: ColumnKey['kind'] | 'current';
|
|
10
|
+
columnIds: string[];
|
|
11
|
+
};
|
|
12
|
+
type KeyState = Pick<RootState, 'collections' | 'settings'>;
|
|
13
|
+
/**
|
|
14
|
+
* The keys a foreign key can reference on the table: its primary key, in
|
|
15
|
+
* column order, then each unique column; a unique column over the very columns
|
|
16
|
+
* of a key before it is left out, so a primary key also marked unique is one.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getCandidateKeys(state: KeyState, table: Table): CandidateKey[];
|
|
19
|
+
/** The key the table's columns declare under the id, as they declare it now. */
|
|
20
|
+
export declare const findColumnKey: (state: KeyState, table: Table, keyId: string) => ColumnKey | undefined;
|
|
21
|
+
/** The References choice of a stored mapping no key covers. */
|
|
22
|
+
export declare const toCurrentKey: (columnIds: string[]) => CandidateKey;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=candidateKeys.d.ts.map
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Relationship, Table } from '../../internal-types';
|
|
3
|
+
/** The child column a row maps its parent column to: one the child holds, or a new one. */
|
|
4
|
+
export type ColumnPick = {
|
|
5
|
+
kind: 'existing';
|
|
6
|
+
columnId: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'new';
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* One pair of a mapping, a parent key column and the child column picked for
|
|
12
|
+
* it, null until one is. A place of a stored mapping its lists cannot pair is
|
|
13
|
+
* invalid, with no parent column where the start list ends before it.
|
|
14
|
+
*/
|
|
15
|
+
export type MappingRow = {
|
|
16
|
+
parentColumnId: string | null;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
invalid?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* What the Map Columns dialog confirms: the relationship to create between two
|
|
22
|
+
* tables, or the one whose columns it changes, with the parent key it reads,
|
|
23
|
+
* a key id of the parent's columns or the stored mapping kept as it is.
|
|
24
|
+
*/
|
|
25
|
+
export type MapColumnsDraft = {
|
|
26
|
+
mode: 'create';
|
|
27
|
+
startTableId: string;
|
|
28
|
+
endTableId: string;
|
|
29
|
+
relationshipType: number;
|
|
30
|
+
keyId: string | null;
|
|
31
|
+
rows: MappingRow[];
|
|
32
|
+
} | {
|
|
33
|
+
mode: 'edit';
|
|
34
|
+
relationshipId: string;
|
|
35
|
+
keyId: string;
|
|
36
|
+
rows: MappingRow[];
|
|
37
|
+
};
|
|
38
|
+
/** A relationship's two column lists, end[i] referencing start[i]. */
|
|
39
|
+
export type ColumnMapping = {
|
|
40
|
+
start: string[];
|
|
41
|
+
end: string[];
|
|
42
|
+
};
|
|
43
|
+
/** The two column lists the relationship holds, as they stand. */
|
|
44
|
+
export declare const toColumnMapping: ({ start, end, }: Relationship) => ColumnMapping;
|
|
45
|
+
/** The table, while the document holds it; a removed one stays an entity a while. */
|
|
46
|
+
export declare function getLiveTable({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, tableId: string): Table | undefined;
|
|
47
|
+
/** The relationship, while the document holds it. */
|
|
48
|
+
export declare function getLiveRelationship({ doc, collections }: Pick<RootState, 'doc' | 'collections'>, relationshipId: string): Relationship | undefined;
|
|
49
|
+
/** Whether the column is one of the live table's, not one removed from it. */
|
|
50
|
+
export declare const isLiveColumn: (table: Table | undefined, columnId: string) => boolean;
|
|
51
|
+
/** Two lists holding the same ids, however ordered or repeated. */
|
|
52
|
+
export declare function sameSet(a: string[], b: string[]): boolean;
|
|
53
|
+
/** Two lists holding the same ids once each, however ordered. */
|
|
54
|
+
export declare const sameMembers: (a: string[], b: string[]) => boolean;
|
|
55
|
+
/** The ids a list holds more than once. */
|
|
56
|
+
export declare function repeatedIds(ids: string[]): Set<string>;
|
|
57
|
+
/** Lists of one length that repeat no id, which pair by place into one key reference. */
|
|
58
|
+
export declare const isNormalMapping: ({ start, end }: ColumnMapping) => boolean;
|
|
59
|
+
/** Two mappings pairing the same columns, in whatever order they list the pairs. */
|
|
60
|
+
export declare const samePairs: (a: ColumnMapping, b: ColumnMapping) => boolean;
|
|
61
|
+
/** Whether the relationship's own lists are normal and pair what the mapping pairs. */
|
|
62
|
+
export declare function holdsPairs(relationship: Relationship, mapping: ColumnMapping): boolean;
|
|
63
|
+
/** The child column each picked row maps to, in row order. */
|
|
64
|
+
export declare const toPickedColumnIds: (rows: MappingRow[]) => string[];
|
|
65
|
+
/** The child columns the other rows hold, which a row's own list shows in use. */
|
|
66
|
+
export declare const getUsedColumnIds: (rows: MappingRow[], rowIndex: number) => Set<string>;
|
|
67
|
+
//# sourceMappingURL=mapping.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Table } from '../../internal-types';
|
|
3
|
+
import { CandidateKey } from './candidateKeys';
|
|
4
|
+
import { ColumnPick } from './mapping';
|
|
5
|
+
/**
|
|
6
|
+
* The names a child column may hold to reference the parent column, compared
|
|
7
|
+
* without case: the name a new foreign key column would take, that name from
|
|
8
|
+
* the table name without its schema, and for a unique key the column's own.
|
|
9
|
+
*/
|
|
10
|
+
export declare function toPrefillNames(tableName: string, columnName: string, bracketType: number, unique: boolean): Set<string>;
|
|
11
|
+
export type PrefillInput = {
|
|
12
|
+
parentTable: Table;
|
|
13
|
+
childTable: Table;
|
|
14
|
+
keyKind: CandidateKey['kind'];
|
|
15
|
+
rows: Array<{
|
|
16
|
+
parentColumnId: string;
|
|
17
|
+
pick: ColumnPick | null;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Picks a child column for each empty row, in row order, where exactly one
|
|
22
|
+
* column holds a name of toPrefillNames; never the parent column itself, nor
|
|
23
|
+
* one a row holds or an earlier row was just given. Only the fills come back.
|
|
24
|
+
*/
|
|
25
|
+
export declare function prefillPicks({ collections, settings }: Pick<RootState, 'collections' | 'settings'>, { parentTable, childTable, keyKind, rows }: PrefillInput): Record<string, ColumnPick>;
|
|
26
|
+
//# sourceMappingURL=prefill.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnyAction } from '@dineug/r-html';
|
|
2
|
+
import { RootState } from '../../engine/state';
|
|
3
|
+
import { MapColumnsDraft } from './mapping';
|
|
4
|
+
/**
|
|
5
|
+
* The one batch a confirmed mapping writes, for a draft validateMapping passes:
|
|
6
|
+
* the new foreign key columns its New rows add, the data type changes the sync
|
|
7
|
+
* makes, then the relationship it adds or the columns it changes.
|
|
8
|
+
*/
|
|
9
|
+
export declare function toMapColumnsActions(state: RootState, draft: MapColumnsDraft, createId: () => string): AnyAction[];
|
|
10
|
+
//# sourceMappingURL=toMapColumnsActions.d.ts.map
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { RootState } from '../../engine/state';
|
|
2
|
+
import { Relationship } from '../../internal-types';
|
|
3
|
+
import { MapColumnsDraft } from './mapping';
|
|
4
|
+
/**
|
|
5
|
+
* What keeps one row from being written: a place its stored lists cannot pair,
|
|
6
|
+
* a parent or picked child column gone from its table, no pick yet, or a child
|
|
7
|
+
* an earlier row already holds.
|
|
8
|
+
*/
|
|
9
|
+
export type MappingRowIssue = 'invalid' | 'removedParent' | 'unpicked' | 'removedChild' | 'inUse';
|
|
10
|
+
/**
|
|
11
|
+
* What keeps the mapping as a whole from being written: rows that cover no key
|
|
12
|
+
* of the parent as it stands, every row on its own column, another relationship
|
|
13
|
+
* linking the same columns, or a mapping the relationship already holds.
|
|
14
|
+
*/
|
|
15
|
+
export type MappingSetIssue = 'noKey' | 'selfOnly' | 'duplicate' | 'unchanged';
|
|
16
|
+
export type MappingIssues = {
|
|
17
|
+
rows: Array<MappingRowIssue | null>;
|
|
18
|
+
set: MappingSetIssue[];
|
|
19
|
+
};
|
|
20
|
+
type MappingState = Pick<RootState, 'doc' | 'collections' | 'settings'>;
|
|
21
|
+
type DraftEnds = {
|
|
22
|
+
startTableId: string;
|
|
23
|
+
endTableId: string;
|
|
24
|
+
relationship?: Relationship;
|
|
25
|
+
};
|
|
26
|
+
/** The tables a draft maps between, read from the relationship it edits. */
|
|
27
|
+
export declare function getDraftEnds({ collections }: Pick<RootState, 'collections'>, draft: MapColumnsDraft): DraftEnds | null;
|
|
28
|
+
/**
|
|
29
|
+
* The issues of each row and of the mapping as a whole, read against the state
|
|
30
|
+
* as it stands, which the dialog shows and the write checks again on landing.
|
|
31
|
+
* A row past the first issue it has reports that one.
|
|
32
|
+
*/
|
|
33
|
+
export declare function validateMapping(state: MappingState, draft: MapColumnsDraft): MappingIssues;
|
|
34
|
+
/** Whether any issue but the set issues given stands in the way. */
|
|
35
|
+
export declare const hasMappingIssues: ({ rows, set }: MappingIssues, ignore?: MappingSetIssue[]) => boolean;
|
|
36
|
+
/** Whether the tables a draft maps between, and the relationship it edits, are all still there. */
|
|
37
|
+
export declare function hasMappingTargets(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the state already holds what the draft would write: every row on a
|
|
40
|
+
* live column it already pairs, in the relationship it edits, or in one from
|
|
41
|
+
* the same parent to the same child a peer or an agent made first.
|
|
42
|
+
*/
|
|
43
|
+
export declare function isSameResult(state: Pick<RootState, 'doc' | 'collections'>, draft: MapColumnsDraft): boolean;
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=validate.d.ts.map
|
|
@@ -58,6 +58,8 @@ export type AMLEntity = {
|
|
|
58
58
|
name: string;
|
|
59
59
|
alias: string;
|
|
60
60
|
comment: string;
|
|
61
|
+
/** The color property as a hex: a name as its own, a hex as written; '' otherwise. */
|
|
62
|
+
color: string;
|
|
61
63
|
attributes: AMLAttribute[];
|
|
62
64
|
};
|
|
63
65
|
/** A struct and a custom type carry neither field, which is what stops a lookup. */
|
|
@@ -12,6 +12,8 @@ export type Token = {
|
|
|
12
12
|
kind: number;
|
|
13
13
|
value: string;
|
|
14
14
|
line: number;
|
|
15
|
+
/** The token's start in the source, which tells touching tokens from spaced ones. */
|
|
16
|
+
offset: number;
|
|
15
17
|
};
|
|
16
18
|
export declare function tokenize(source: string): Token[];
|
|
17
19
|
//# sourceMappingURL=tokenizer.d.ts.map
|
|
@@ -38,6 +38,8 @@ export type DBMLTable = {
|
|
|
38
38
|
name: string;
|
|
39
39
|
alias: string;
|
|
40
40
|
comment: string;
|
|
41
|
+
/** headercolor as written when it is #rgb or #rrggbb; '' otherwise. */
|
|
42
|
+
color: string;
|
|
41
43
|
columns: DBMLColumn[];
|
|
42
44
|
indexes: DBMLIndex[];
|
|
43
45
|
};
|
|
@@ -49,9 +51,18 @@ export type DBMLRef = {
|
|
|
49
51
|
onDelete: string;
|
|
50
52
|
onUpdate: string;
|
|
51
53
|
};
|
|
54
|
+
export type DBMLTableName = Pick<DBMLEndpoint, 'schemaName' | 'tableName'>;
|
|
55
|
+
export type DBMLTableGroup = {
|
|
56
|
+
name: string;
|
|
57
|
+
/** color as written when it is #rgb or #rrggbb; '' otherwise. */
|
|
58
|
+
color: string;
|
|
59
|
+
/** One per member line, as written; resolving them is convert.ts's concern. */
|
|
60
|
+
tables: DBMLTableName[];
|
|
61
|
+
};
|
|
52
62
|
export type DBMLModel = {
|
|
53
63
|
tables: DBMLTable[];
|
|
54
64
|
refs: DBMLRef[];
|
|
65
|
+
tableGroups: DBMLTableGroup[];
|
|
55
66
|
/** Keyed by the qualified name, so s.status and status stay apart. */
|
|
56
67
|
enums: Record<string, string[]>;
|
|
57
68
|
skipped: string[];
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
5
6
|
/**
|
|
6
7
|
* A comment per column the diagram marks unique, after the table: UNIQUE is not
|
|
7
8
|
* one of the constraints Databricks accepts, so it is reported, never dropped.
|
|
8
9
|
*/
|
|
9
10
|
export declare function formatUnique({ collections }: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
11
|
export declare function formatIndex({ collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
12
|
+
/** USE SCHEMA, after CREATE SCHEMA IF NOT EXISTS for createAndUse. */
|
|
13
|
+
export declare function formatHeader(_: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
14
|
+
/** Each table written dropped, its foreign keys with it. */
|
|
15
|
+
export declare function formatDropBlock(_: RootState, { tables }: WrittenObjects): string;
|
|
11
16
|
//# sourceMappingURL=Databricks.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { written }?: CreateSchemaOptions): string;
|
|
4
5
|
export declare function formatTable(state: RootState, { buffer, table }: FormatTableOptions): void;
|
|
5
6
|
/**
|
|
6
7
|
* One named constraint per column the diagram marks unique, after the table.
|
|
@@ -8,4 +9,15 @@ export declare function formatTable(state: RootState, { buffer, table }: FormatT
|
|
|
8
9
|
*/
|
|
9
10
|
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
11
|
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* USE for use; for createAndUse, CREATE DATABASE first where DB_ID finds none.
|
|
14
|
+
* Each ends its batch with GO.
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* One transaction that drops each foreign key a written table holds, found in
|
|
19
|
+
* its own database's catalog, then the tables, all rolled back on an error, so
|
|
20
|
+
* a key held from outside them still refuses; IF EXISTS needs SQL Server 2016.
|
|
21
|
+
*/
|
|
22
|
+
export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
|
|
11
23
|
//# sourceMappingURL=MSSQL.d.ts.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
-
export
|
|
4
|
-
export declare function
|
|
2
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
+
export { formatDropBlock, formatHeader } from './MySQL';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
5
6
|
/**
|
|
6
7
|
* One named constraint per column the diagram marks unique, after the table.
|
|
7
8
|
* The whole export and the per-table Schema SQL tab both write it.
|
|
8
9
|
*/
|
|
9
|
-
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
|
-
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
10
|
+
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
11
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
|
|
11
12
|
//# sourceMappingURL=MariaDB.d.ts.map
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
5
6
|
/**
|
|
6
7
|
* One named constraint per column the diagram marks unique, after the table.
|
|
7
8
|
* The whole export and the per-table Schema SQL tab both write it.
|
|
8
9
|
*/
|
|
9
10
|
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
|
-
export declare function formatIndex(
|
|
11
|
+
export declare function formatIndex(state: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
12
|
+
/** USE, after CREATE DATABASE IF NOT EXISTS for createAndUse; MariaDB's too. */
|
|
13
|
+
export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
14
|
+
/**
|
|
15
|
+
* Every table written dropped while the foreign key checks are off, so the
|
|
16
|
+
* order does not matter, and the checks back on before the tables are created;
|
|
17
|
+
* MariaDB's too.
|
|
18
|
+
*/
|
|
19
|
+
export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
|
|
11
20
|
//# sourceMappingURL=MySQL.d.ts.map
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, written }: FormatTableOptions): void;
|
|
5
6
|
/**
|
|
6
7
|
* One named constraint per column the diagram marks unique, after the table.
|
|
7
8
|
* The whole export and the per-table Schema SQL tab both write it.
|
|
8
9
|
*/
|
|
9
|
-
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table }: FormatTableOptions): void;
|
|
10
|
-
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
10
|
+
export declare function formatUnique({ settings: { bracketType }, collections }: RootState, { buffer, table, written }: FormatTableOptions): void;
|
|
11
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, written }: FormatIndexOptions): void;
|
|
12
|
+
/**
|
|
13
|
+
* The names an Oracle script of the document, or of the tables given, writes
|
|
14
|
+
* past the 30 bytes Oracle 12.1 and older allow.
|
|
15
|
+
*/
|
|
16
|
+
export declare function oracleLongNames(state: RootState, tableIds?: readonly string[]): string[];
|
|
17
|
+
/** ALTER SESSION SET CURRENT_SCHEMA for use; Oracle creates no schema apart from a user. */
|
|
18
|
+
export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
19
|
+
/**
|
|
20
|
+
* Each table written dropped with its constraints, then each sequence, every one
|
|
21
|
+
* in a block that passes over ORA-00942 or ORA-02289, since Oracle has no DROP
|
|
22
|
+
* IF EXISTS before 23ai.
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables, sequences }: WrittenObjects): string;
|
|
11
25
|
//# sourceMappingURL=Oracle.d.ts.map
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
6
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
|
|
7
|
+
/**
|
|
8
|
+
* CREATE SCHEMA IF NOT EXISTS and a search_path that puts it first, for
|
|
9
|
+
* createAndUse; PostgreSQL has no USE, so use writes nothing.
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* One DROP TABLE IF EXISTS naming every table written, which refuses to drop a
|
|
14
|
+
* table another one outside it references. Under the createAndUse header a
|
|
15
|
+
* table with no schema of its own is named in that schema, never public's.
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects, header: SchemaSQLHeader, name: string): string;
|
|
6
18
|
//# sourceMappingURL=PostgreSQL.d.ts.map
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import { FormatIndexOptions, FormatTableOptions } from './utils';
|
|
3
|
-
export declare function createSchema(state: RootState): string;
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions, WrittenObjects } from './utils';
|
|
3
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
4
|
+
/**
|
|
5
|
+
* An integer type name, with or without a width, which an AUTOINCREMENT key
|
|
6
|
+
* is written as INTEGER for; the rest keep their type and lose the keyword.
|
|
7
|
+
*/
|
|
8
|
+
export declare function isIntegerFamily(dataType: string): boolean;
|
|
9
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
10
|
+
export declare function formatIndex({ settings: { bracketType }, collections }: RootState, { buffer, index, indexNames, statements }: FormatIndexOptions): void;
|
|
11
|
+
/** SQLite has no database or schema to create or select in a script. */
|
|
12
|
+
export declare function formatHeader(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Foreign key enforcement off, which stays off for the connection, and then
|
|
15
|
+
* each table written dropped, so the order does not matter.
|
|
16
|
+
*/
|
|
17
|
+
export declare function formatDropBlock({ settings: { bracketType } }: RootState, { tables }: WrittenObjects): string;
|
|
6
18
|
//# sourceMappingURL=SQLite.d.ts.map
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
2
|
+
import { SchemaSQLHeader } from './options';
|
|
3
|
+
import { CreateSchemaOptions, FormatIndexOptions, FormatTableOptions } from './utils';
|
|
4
|
+
export declare function createSchema(state: RootState, tableIds?: readonly string[], { statements, written }?: CreateSchemaOptions): string;
|
|
5
|
+
export declare function formatTable(state: RootState, { buffer, table, statements }: FormatTableOptions): void;
|
|
5
6
|
export declare function formatIndex({ collections, settings: { bracketType } }: RootState, { buffer, index, indexNames }: FormatIndexOptions): void;
|
|
7
|
+
/** USE SCHEMA, after CREATE SCHEMA IF NOT EXISTS for createAndUse. */
|
|
8
|
+
export declare function formatHeader({ settings: { bracketType } }: RootState, header: Exclude<SchemaSQLHeader, 'none'>, name: string): string;
|
|
9
|
+
/** Nothing: recreate writes CREATE OR REPLACE TABLE instead. */
|
|
10
|
+
export declare function formatDropBlock(): string;
|
|
6
11
|
//# sourceMappingURL=Snowflake.d.ts.map
|
|
@@ -1,6 +1,21 @@
|
|
|
1
1
|
import { RootState } from '../../engine/state';
|
|
2
2
|
import { Table } from '../../internal-types';
|
|
3
|
-
|
|
3
|
+
import { SchemaSQLOptions } from './options';
|
|
4
|
+
export { HEADER_NAME_PATTERN, isSchemaSQLHeader, isSchemaSQLStatements, type ResolvedSchemaSQLOptions, resolveSchemaSQLOptions, SchemaSQLHeader, SchemaSQLHeaderList, type SchemaSQLOptions, SchemaSQLStatements, SchemaSQLStatementsList, schemaSQLSupport, } from './options';
|
|
5
|
+
export { oracleLongNames } from './Oracle';
|
|
6
|
+
/** The options a read passes, and whether the before and after scripts are written. */
|
|
7
|
+
export type CreateSchemaSQLOptions = SchemaSQLOptions & {
|
|
8
|
+
/** Left out, the whole document's DDL writes them and that of some tables none. */
|
|
9
|
+
scripts?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* The DDL of the document in a database, the document's own by default: the
|
|
13
|
+
* header, the before script, the DROP block, the tables and the after script.
|
|
14
|
+
* Given table ids, only those tables, their indexes and foreign keys.
|
|
15
|
+
*/
|
|
16
|
+
export declare function createSchemaSQL(state: RootState, database?: number, tableIds?: readonly string[], options?: CreateSchemaSQLOptions): string;
|
|
17
|
+
/** The names of the tables the DDL writes, all or those given, in its order. */
|
|
18
|
+
export declare function schemaSQLTables(state: RootState, tableIds?: readonly string[]): string[];
|
|
4
19
|
/**
|
|
5
20
|
* One table's DDL for the table properties Schema SQL tab: the table, the
|
|
6
21
|
* uniqueness its columns carry where the whole export writes it as its own
|