SQL: Return correct catalog separator in JDBC (#33670)
JDBC DatabaseMetadata returns correct separator (:) for catalog/cluster names. Fix #33654
This commit is contained in:
parent
53ba253aa4
commit
60ab4f97ab
|
@ -368,7 +368,7 @@ class JdbcDatabaseMetaData implements DatabaseMetaData, JdbcWrapper {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCatalogSeparator() throws SQLException {
|
public String getCatalogSeparator() throws SQLException {
|
||||||
return ".";
|
return ":";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
|
||||||
|
* or more contributor license agreements. Licensed under the Elastic License;
|
||||||
|
* you may not use this file except in compliance with the Elastic License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.elasticsearch.xpack.sql.jdbc.jdbc;
|
||||||
|
|
||||||
|
import org.elasticsearch.test.ESTestCase;
|
||||||
|
|
||||||
|
public class JdbcDatabaseMetaDataTests extends ESTestCase {
|
||||||
|
|
||||||
|
private JdbcDatabaseMetaData md = new JdbcDatabaseMetaData(null);
|
||||||
|
|
||||||
|
public void testSeparators() throws Exception {
|
||||||
|
assertEquals(":", md.getCatalogSeparator());
|
||||||
|
assertEquals("\"", md.getIdentifierQuoteString());
|
||||||
|
assertEquals("\\", md.getSearchStringEscape());
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue