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