diff --git a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml index 46cd997963..cbd9c57a41 100644 --- a/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml +++ b/server/bundles/io.cloudbeaver.resources.drivers.base/plugin.xml @@ -17,6 +17,7 @@ + @@ -36,6 +37,7 @@ + @@ -55,6 +57,7 @@ + diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java index a0d4602162..61f0a8e970 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/model/WebDatabaseDriverInfo.java @@ -182,6 +182,7 @@ public WebPropertyInfo[] getDriverProperties() throws DBWebException { cfg.setUrl(driver.getSampleURL()); cfg.setHostName(DBConstants.HOST_LOCALHOST); cfg.setHostPort(driver.getDefaultPort()); + cfg.setDatabaseName(driver.getDefaultDatabase()); cfg.setUrl(driver.getConnectionURL(cfg)); DBPPropertyDescriptor[] properties = driver.getDataSourceProvider().getConnectionProperties(webSession.getProgressMonitor(), driver, cfg); if (properties == null) { diff --git a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java index 08e199f930..a6b01c916d 100644 --- a/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java +++ b/server/bundles/io.cloudbeaver.server/src/io/cloudbeaver/service/sql/WebSQLProcessor.java @@ -364,9 +364,16 @@ public WebSQLExecuteInfo updateResultsDataBatch( isAutoCommitEnabled = txnManager.isAutoCommit(); if (txnManager.isSupportsTransactions() && isAutoCommitEnabled) { txnManager.setAutoCommit(monitor, false); - savepoint = txnManager.setSavepoint(monitor, null); revertToAutoCommit = true; } + if (!txnManager.isAutoCommit() && txnManager.supportsSavepoints()) { + try { + savepoint = txnManager.setSavepoint(monitor, null); + } catch (Throwable e) { + // May be savepoints not supported + log.debug("Can't set savepoint", e); + } + } } try { Map options = Collections.emptyMap(); diff --git a/server/drivers/kyuubi/pom.xml b/server/drivers/kyuubi/pom.xml new file mode 100644 index 0000000000..d59c25552b --- /dev/null +++ b/server/drivers/kyuubi/pom.xml @@ -0,0 +1,25 @@ + + 4.0.0 + drivers.kyuubi + 1.0.0 + + io.cloudbeaver + drivers + 1.0.0 + ../ + + + + kyuubi + + + + + org.apache.kyuubi + kyuubi-hive-jdbc-shaded + 1.9.0 + + + + diff --git a/server/drivers/pom.xml b/server/drivers/pom.xml index 2d5d4b3718..39fecc0302 100644 --- a/server/drivers/pom.xml +++ b/server/drivers/pom.xml @@ -18,6 +18,7 @@ h2 h2_v2 jaybird + kyuubi mysql mariadb oracle diff --git a/server/drivers/trino/pom.xml b/server/drivers/trino/pom.xml index d2c5220ece..6664afd89a 100644 --- a/server/drivers/trino/pom.xml +++ b/server/drivers/trino/pom.xml @@ -18,7 +18,7 @@ io.trino trino-jdbc - 422 + 438 diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css new file mode 100644 index 0000000000..3d000a41c9 --- /dev/null +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.m.css @@ -0,0 +1,52 @@ +/* + * CloudBeaver - Cloud Database Manager + * Copyright (C) 2020-2024 DBeaver Corp and others + * + * Licensed under the Apache License, Version 2.0. + * you may not use this file except in compliance with the License. + */ + +.wrapper { + overflow: hidden; + height: 100%; + width: 100%; +} + +.table { + flex: 1 1 auto; + width: 100%; +} + +.tableWrapper { + height: 100%; +} + +.messageTitleBox { + display: flex; + align-items: center; + + .messageTitle { + flex: 1; + } +} + +.tableColumnHeader { + white-space: nowrap; + text-overflow: ellipsis; +} + +.tableColumnHeaderMin { + width: 32px; +} + +.timestamp { + width: 116px; + min-width: 116px; +} + +.clearButton { + position: absolute !important; + top: 4px; + right: 16px; + z-index: 100; +} diff --git a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx index 0669d3cee2..5c59875d41 100644 --- a/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx +++ b/webapp/packages/plugin-log-viewer/src/LogViewer/LogViewerTable.tsx @@ -6,50 +6,12 @@ * you may not use this file except in compliance with the License. */ import { observer } from 'mobx-react-lite'; -import styled, { css, use } from 'reshadow'; -import { MenuBarSmallItem, Table, TableBody, TableColumnHeader, TableHeader, useStyles, useTranslate } from '@cloudbeaver/core-blocks'; +import { Container, MenuBarSmallItem, s, Table, TableBody, TableColumnHeader, TableHeader, useS, useTranslate } from '@cloudbeaver/core-blocks'; import type { ILogEntry } from './ILogEntry'; import { LogEntry } from './LogEntry'; - -const styles = css` - wrapper { - overflow: hidden; - display: flex; - flex-direction: column; - height: 100%; - } - Table { - flex: 1 1 auto; - width: 100%; - } - table-wrapper { - overflow: auto; - } - message-title-box { - display: flex; - align-items: center; - - & message-title { - flex: 1; - } - } - [|buttons] { - text-align: right; - } - TableColumnHeader { - white-space: nowrap; - text-overflow: ellipsis; - } - TableColumnHeader[min] { - width: 32px; - } - [|timestamp] { - width: 116px; - min-width: 116px; - } -`; +import styles from './LogViewerTable.m.css'; interface Props { items: ILogEntry[]; @@ -60,22 +22,30 @@ interface Props { } export const LogViewerTable = observer(function LogViewerTable({ items, selectedItem, onItemSelect, onClear, className }) { const translate = useTranslate(); - const style = useStyles(styles); + const style = useS(styles); - return styled(style)( - - - + return ( + + + {translate('ui_clear')} + + + - - {translate('plugin_log_viewer_entry_timestamp')} - - - {translate('plugin_log_viewer_entry_message')} - - {translate('ui_clear')} - - + + + {translate('plugin_log_viewer_entry_timestamp')} + + + + {translate('plugin_log_viewer_entry_message')} + @@ -84,7 +54,7 @@ export const LogViewerTable = observer(function LogViewerTable({ items, s ))} - - , + + ); });