mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Allow constraints for ODBC and JDBC tables
This commit is contained in:
parent
0ed56f0255
commit
ccfc41bce5
@ -27,19 +27,19 @@ StorageXDBC::StorageXDBC(
|
||||
const StorageID & table_id_,
|
||||
const std::string & remote_database_name_,
|
||||
const std::string & remote_table_name_,
|
||||
const ColumnsDescription & columns_,
|
||||
ColumnsDescription columns_,
|
||||
ConstraintsDescription constraints_,
|
||||
const String & comment,
|
||||
ContextPtr context_,
|
||||
const BridgeHelperPtr bridge_helper_)
|
||||
/// Please add support for constraints as soon as StorageODBC or JDBC will support insertion.
|
||||
: IStorageURLBase(
|
||||
"",
|
||||
context_,
|
||||
table_id_,
|
||||
IXDBCBridgeHelper::DEFAULT_FORMAT,
|
||||
getFormatSettings(context_),
|
||||
columns_,
|
||||
ConstraintsDescription{},
|
||||
std::move(columns_),
|
||||
std::move(constraints_),
|
||||
comment,
|
||||
"" /* CompressionMethod */)
|
||||
, bridge_helper(bridge_helper_)
|
||||
@ -174,6 +174,7 @@ namespace
|
||||
engine_args[1]->as<ASTLiteral &>().value.safeGet<String>(),
|
||||
engine_args[2]->as<ASTLiteral &>().value.safeGet<String>(),
|
||||
args.columns,
|
||||
args.constraints,
|
||||
args.comment,
|
||||
args.getContext(),
|
||||
bridge_helper);
|
||||
|
@ -32,7 +32,8 @@ public:
|
||||
const StorageID & table_id_,
|
||||
const std::string & remote_database_name,
|
||||
const std::string & remote_table_name,
|
||||
const ColumnsDescription & columns_,
|
||||
ColumnsDescription columns_,
|
||||
ConstraintsDescription constraints_,
|
||||
const String & comment,
|
||||
ContextPtr context_,
|
||||
BridgeHelperPtr bridge_helper_);
|
||||
|
@ -97,7 +97,7 @@ StoragePtr ITableFunctionXDBC::executeImpl(const ASTPtr & /*ast_function*/, Cont
|
||||
startBridgeIfNot(context);
|
||||
auto columns = getActualTableStructure(context);
|
||||
auto result = std::make_shared<StorageXDBC>(
|
||||
StorageID(getDatabaseName(), table_name), schema_name, remote_table_name, columns, String{}, context, helper);
|
||||
StorageID(getDatabaseName(), table_name), schema_name, remote_table_name, columns, ConstraintsDescription{}, String{}, context, helper);
|
||||
result->startup();
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user