dbeaver/pro#8821 feat: add import settings step - #4506
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 41 |
| Duplication | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
…-with-optional-snapshotrollback-safety-net
…mergeupsert-with-optional-snapshotrollback-safety-net' into 8821-customer-wants-import-with-mergeupsert-with-optional-snapshotrollback-safety-net
| function getDefaultSettings(configuration: IDataImportDriverConfiguration): DataTransferImportSettings { | ||
| const settings: DataTransferImportSettings = {}; | ||
|
|
||
| if (configuration.supportsTransactions) { | ||
| settings.useTransactions = true; | ||
| } | ||
|
|
||
| if (configuration.supportedInsertReplaceMethods) { | ||
| settings.onDuplicateKeyMethod = undefined; | ||
| } | ||
|
|
||
| if (configuration.supportsBulkLoad) { | ||
| settings.useBulkLoad = false; | ||
| } | ||
|
|
||
| return settings; | ||
| } |
There was a problem hiding this comment.
it would be nice to have 1 interface with settings so don't need to map it at all
| if (this.state.step === EDataImportDialogStep.Settings) { | ||
| this.state.step = EDataImportDialogStep.File; | ||
| } else if (this.state.step === EDataImportDialogStep.File) { |
There was a problem hiding this comment.
what if we introduce this kind of data structure?
{steps: [Processor, File, Settings], currentStep: 0, goNext(){ this.currentStep++ }, goBack(){this.currentStep--}}
or something like this so we have like defined determinated steps and can safely iterate it without fearing that somewhere we can miss-step the flow
There was a problem hiding this comment.
we can create a ticket for investigation, I guess
| if (dialog.state.file && dialog.state.selectedProcessor) { | ||
| resolveDialog({ file: dialog.state.file, processorId: dialog.state.selectedProcessor.id, settings: dialog.state.settings }); | ||
| } |
There was a problem hiding this comment.
is it something in the interface notifying user that there are no file or there is no selected processor? maybe not a bad idea to notify what happened if something is off the scenario
There was a problem hiding this comment.
how is it possible?
There was a problem hiding this comment.
So the user can't trigger import without both, so nothing to notify about here
No description provided.