mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
Merge branch 'master' of https://github.com/antares-sql/antares into ts-renderer
This commit is contained in:
@@ -3,7 +3,7 @@ import * as antares from 'common/interfaces/antares';
|
||||
import { InsertRowsParams } from 'common/interfaces/tableApis';
|
||||
import { ipcMain } from 'electron';
|
||||
import { faker } from '@faker-js/faker';
|
||||
import moment from 'moment';
|
||||
import * as moment from 'moment';
|
||||
import { sqlEscaper } from 'common/libs/sqlEscaper';
|
||||
import { TEXT, LONG_TEXT, ARRAY, TEXT_SEARCH, NUMBER, FLOAT, BLOB, BIT, DATE, DATETIME } from 'common/fieldTypes';
|
||||
import customizations from 'common/customizations';
|
||||
|
@@ -144,7 +144,11 @@ export class PostgreSQLClient extends AntaresCore {
|
||||
|
||||
async getConnectionPool () {
|
||||
const dbConfig = await this.getDbConfig();
|
||||
const pool = new pg.Pool({ ...dbConfig, max: this._poolSize });
|
||||
const pool = new pg.Pool({
|
||||
...dbConfig,
|
||||
max: this._poolSize,
|
||||
idleTimeoutMillis: 0
|
||||
});
|
||||
const connection = pool;
|
||||
|
||||
if (this._params.readonly) {
|
||||
|
@@ -255,7 +255,8 @@ export default {
|
||||
durationsCount: 0,
|
||||
affectedCount: null,
|
||||
editorHeight: 200,
|
||||
isHistoryOpen: false
|
||||
isHistoryOpen: false,
|
||||
debounceTimeout: null
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -285,6 +286,19 @@ export default {
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
query (val) {
|
||||
clearTimeout(this.debounceTimeout);
|
||||
|
||||
this.debounceTimeout = setTimeout(() => {
|
||||
this.updateTabContent({
|
||||
uid: this.connection.uid,
|
||||
tab: this.tab.uid,
|
||||
type: 'query',
|
||||
schema: this.selectedSchema,
|
||||
content: val
|
||||
});
|
||||
}, 200);
|
||||
},
|
||||
isSelected (val) {
|
||||
if (val) {
|
||||
this.changeBreadcrumbs({ schema: this.selectedSchema, query: `Query #${this.tab.index}` });
|
||||
@@ -357,13 +371,6 @@ export default {
|
||||
return acc + (curr.report ? curr.report.affectedRows : 0);
|
||||
}, null);
|
||||
|
||||
this.updateTabContent({
|
||||
uid: this.connection.uid,
|
||||
tab: this.tab.uid,
|
||||
type: 'query',
|
||||
schema: this.selectedSchema,
|
||||
content: query
|
||||
});
|
||||
this.saveHistory(params);
|
||||
if (!this.autocommit)
|
||||
this.setUnsavedChanges({ uid: this.connection.uid, tUid: this.tabUid, isChanged: true });
|
||||
|
@@ -1,14 +1,8 @@
|
||||
|
||||
@mixin type-colors($types) {
|
||||
$numbers: ('int','tinyint','smallint','mediumint','float','double','decimal');
|
||||
|
||||
@each $type, $color in $types {
|
||||
.type-#{$type} {
|
||||
color: $color;
|
||||
|
||||
@if index($numbers, $type) {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user