-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-4401 feat: save value panel state per column #2272
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0dc8ff8
CB-4401 feat: save value panel state per column
Wroud 55cc82c
CB-4401 fix: pr review
Wroud 2701e32
Merge branch 'devel' into feat/cb-4401/save-value-pannel-state-per-co…
dariamarutkina 5b82dee
Merge branch 'devel' into feat/cb-4401/save-value-pannel-state-per-co…
dariamarutkina File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseDataResultAction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2023 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; | ||
|
||
import { DatabaseDataAction } from '../DatabaseDataAction'; | ||
import type { IDatabaseDataResult } from '../IDatabaseDataResult'; | ||
import type { IDatabaseDataSource } from '../IDatabaseDataSource'; | ||
import { databaseDataAction } from './DatabaseDataActionDecorator'; | ||
import type { IDatabaseDataResultAction } from './IDatabaseDataResultAction'; | ||
|
||
@databaseDataAction() | ||
export abstract class DatabaseDataResultAction<TKey, TResult extends IDatabaseDataResult> | ||
extends DatabaseDataAction<any, TResult> | ||
implements IDatabaseDataResultAction<TKey, TResult> | ||
{ | ||
static dataFormat: ResultDataFormat[] | null = null; | ||
|
||
constructor(source: IDatabaseDataSource<any, TResult>) { | ||
super(source); | ||
} | ||
abstract getIdentifier(key: TKey): string; | ||
abstract serialize(key: TKey): string; | ||
} |
47 changes: 47 additions & 0 deletions
47
webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/DatabaseMetadataAction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2023 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import type { ResultDataFormat } from '@cloudbeaver/core-sdk'; | ||
import { MetadataMap } from '@cloudbeaver/core-utils'; | ||
|
||
import { DatabaseDataAction } from '../DatabaseDataAction'; | ||
import type { IDatabaseDataResult } from '../IDatabaseDataResult'; | ||
import type { IDatabaseDataSource } from '../IDatabaseDataSource'; | ||
import { databaseDataAction } from './DatabaseDataActionDecorator'; | ||
import type { IDatabaseDataMetadataAction } from './IDatabaseDataMetadataAction'; | ||
|
||
@databaseDataAction() | ||
export class DatabaseMetadataAction<TKey, TResult extends IDatabaseDataResult> | ||
extends DatabaseDataAction<any, TResult> | ||
implements IDatabaseDataMetadataAction<TKey, TResult> | ||
{ | ||
static dataFormat: ResultDataFormat[] | null = null; | ||
readonly metadata: MetadataMap<string, any>; | ||
|
||
constructor(source: IDatabaseDataSource<any, TResult>) { | ||
super(source); | ||
this.metadata = new MetadataMap(); | ||
} | ||
|
||
has(key: string): boolean { | ||
return this.metadata.has(key); | ||
} | ||
|
||
get<T>(key: string): T | undefined; | ||
get<T>(key: string, getDefaultValue: (() => T) | undefined): T; | ||
get<T>(key: string, getDefaultValue?: (() => T) | undefined): T | undefined { | ||
return this.metadata.get(key, getDefaultValue); | ||
} | ||
|
||
set(key: string, value: any): void { | ||
this.metadata.set(key, value); | ||
} | ||
|
||
delete(key: string): void { | ||
this.metadata.delete(key); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
.../packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* CloudBeaver - Cloud Database Manager | ||
* Copyright (C) 2020-2023 DBeaver Corp and others | ||
* | ||
* Licensed under the Apache License, Version 2.0. | ||
* you may not use this file except in compliance with the License. | ||
*/ | ||
import type { IDatabaseDataAction } from '../IDatabaseDataAction'; | ||
import type { IDatabaseDataResult } from '../IDatabaseDataResult'; | ||
|
||
export interface IDatabaseDataMetadataAction<TKey, TResult extends IDatabaseDataResult> extends IDatabaseDataAction<any, TResult> { | ||
Check warning on line 11 in webapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts Jenkins-CI-integration / CheckStyle TypeScript Reportwebapp/packages/plugin-data-viewer/src/DatabaseDataModel/Actions/IDatabaseDataMetadataAction.ts#L11
|
||
get<T>(key: string): T | undefined; | ||
get<T>(key: string, getDefaultValue: () => T): T; | ||
set(key: string, value: any): void; | ||
delete(key: string): void; | ||
has(key: string): boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, changed