mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-18 00:56:02 +00:00
@@ -37,7 +37,8 @@ export class TableGridDisplay extends GridDisplay {
|
|||||||
public displayOptions: any,
|
public displayOptions: any,
|
||||||
serverVersion,
|
serverVersion,
|
||||||
public getDictionaryDescription: DictionaryDescriptionFunc = null,
|
public getDictionaryDescription: DictionaryDescriptionFunc = null,
|
||||||
isReadOnly = false
|
isReadOnly = false,
|
||||||
|
public isRawMode = false
|
||||||
) {
|
) {
|
||||||
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion);
|
super(config, setConfig, cache, setCache, driver, dbinfo, serverVersion);
|
||||||
|
|
||||||
@@ -172,6 +173,9 @@ export class TableGridDisplay extends GridDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
addHintsToSelect(select: Select): boolean {
|
addHintsToSelect(select: Select): boolean {
|
||||||
|
if (this.isRawMode) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
let res = false;
|
let res = false;
|
||||||
const groupColumns = this.groupColumns;
|
const groupColumns = this.groupColumns;
|
||||||
for (const column of this.hintBaseColumns || this.getGridColumns()) {
|
for (const column of this.hintBaseColumns || this.getGridColumns()) {
|
||||||
|
|||||||
@@ -862,7 +862,7 @@
|
|||||||
},
|
},
|
||||||
forceNewTab,
|
forceNewTab,
|
||||||
null,
|
null,
|
||||||
null,
|
prefferedAction.icon,
|
||||||
data,
|
data,
|
||||||
tabPreviewMode
|
tabPreviewMode
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ function getTableLikeActions(dataTab) {
|
|||||||
tab: dataTab,
|
tab: dataTab,
|
||||||
defaultActionId: 'openRawTable',
|
defaultActionId: 'openRawTable',
|
||||||
isRawMode: true,
|
isRawMode: true,
|
||||||
|
icon: dataTab == 'ViewDataTab' ? 'img raw-view' : 'img raw-table',
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// label: 'Open form',
|
// label: 'Open form',
|
||||||
|
|||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
export let preprocessLoadedRow = null;
|
export let preprocessLoadedRow = null;
|
||||||
export let setLoadedRows = null;
|
export let setLoadedRows = null;
|
||||||
|
export let isRawMode = false;
|
||||||
|
|
||||||
// export let griderFactory;
|
// export let griderFactory;
|
||||||
|
|
||||||
@@ -65,7 +66,7 @@
|
|||||||
if (nextRows.errorMessage) {
|
if (nextRows.errorMessage) {
|
||||||
errorMessage = nextRows.errorMessage;
|
errorMessage = nextRows.errorMessage;
|
||||||
} else {
|
} else {
|
||||||
if (allRowCount == null) handleLoadRowCount();
|
if (allRowCount == null && !isRawMode) handleLoadRowCount();
|
||||||
|
|
||||||
loadedRows = [...loadedRows, ...(preprocessLoadedRow ? nextRows.map(preprocessLoadedRow) : nextRows)];
|
loadedRows = [...loadedRows, ...(preprocessLoadedRow ? nextRows.map(preprocessLoadedRow) : nextRows)];
|
||||||
isLoadedAll = nextRows.length === 0;
|
isLoadedAll = nextRows.length === 0;
|
||||||
|
|||||||
@@ -45,6 +45,8 @@
|
|||||||
export let setCache;
|
export let setCache;
|
||||||
export let multipleGridsOnTab = false;
|
export let multipleGridsOnTab = false;
|
||||||
|
|
||||||
|
export let isRawMode = false;
|
||||||
|
|
||||||
$: connection = useConnectionInfo({ conid });
|
$: connection = useConnectionInfo({ conid });
|
||||||
$: dbinfo = useDatabaseInfo({ conid, database });
|
$: dbinfo = useDatabaseInfo({ conid, database });
|
||||||
$: serverVersion = useDatabaseServerVersion({ conid, database });
|
$: serverVersion = useDatabaseServerVersion({ conid, database });
|
||||||
@@ -71,7 +73,8 @@
|
|||||||
{ showHintColumns: getBoolSettingsValue('dataGrid.showHintColumns', true) },
|
{ showHintColumns: getBoolSettingsValue('dataGrid.showHintColumns', true) },
|
||||||
$serverVersion,
|
$serverVersion,
|
||||||
table => getDictionaryDescription(table, conid, database, $apps, $connections),
|
table => getDictionaryDescription(table, conid, database, $apps, $connections),
|
||||||
$connection?.isReadOnly
|
$connection?.isReadOnly,
|
||||||
|
isRawMode
|
||||||
)
|
)
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
|
|||||||
@@ -255,9 +255,11 @@
|
|||||||
'img database': 'mdi mdi-database color-icon-gold',
|
'img database': 'mdi mdi-database color-icon-gold',
|
||||||
'img sqlite-database': 'mdi mdi-database color-icon-blue',
|
'img sqlite-database': 'mdi mdi-database color-icon-blue',
|
||||||
'img table': 'mdi mdi-table color-icon-blue',
|
'img table': 'mdi mdi-table color-icon-blue',
|
||||||
|
'img raw-table': 'mdi mdi-table-large color-icon-blue',
|
||||||
'img collection': 'mdi mdi-table color-icon-red',
|
'img collection': 'mdi mdi-table color-icon-red',
|
||||||
'img query-data': 'mdi mdi-table color-icon-yellow',
|
'img query-data': 'mdi mdi-table color-icon-yellow',
|
||||||
'img view': 'mdi mdi-table color-icon-magenta',
|
'img view': 'mdi mdi-table color-icon-magenta',
|
||||||
|
'img raw-view': 'mdi mdi-table-large color-icon-magenta',
|
||||||
'img procedure': 'mdi mdi-cog color-icon-blue',
|
'img procedure': 'mdi mdi-cog color-icon-blue',
|
||||||
'img function': 'mdi mdi-function-variant',
|
'img function': 'mdi mdi-function-variant',
|
||||||
'img table-structure': 'mdi mdi-tools color-icon-blue',
|
'img table-structure': 'mdi mdi-tools color-icon-blue',
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
onClick: () => getCurrentEditor().startAutoRefresh(),
|
onClick: () => getCurrentEditor().startAutoRefresh(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const matchingProps = ['conid', 'database', 'schemaName', 'pureName'];
|
export const matchingProps = ['conid', 'database', 'schemaName', 'pureName', 'isRawMode'];
|
||||||
export const allowAddToFavorites = props => true;
|
export const allowAddToFavorites = props => true;
|
||||||
export const allowSwitchDatabase = props => true;
|
export const allowSwitchDatabase = props => true;
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user