-
Notifications
You must be signed in to change notification settings - Fork 316
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
- Loading branch information
Showing
11 changed files
with
2,736 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
// Copyright(C) 2025 InfiniFlow, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
module; | ||
|
||
// #include <cassert> | ||
// #include <filesystem> | ||
// #include <fstream> | ||
// #include <thread> | ||
// #include <vector> | ||
|
||
module new_catalog; | ||
// | ||
import stl; | ||
// import defer_op; | ||
// import data_type; | ||
// import txn_manager; | ||
// import logger; | ||
// import third_party; | ||
import status; | ||
// import infinity_exception; | ||
// import function_set; | ||
// import scalar_function_set; | ||
// import table_function; | ||
// import special_function; | ||
// import buffer_manager; | ||
// import column_def; | ||
// import virtual_store; | ||
// import table_def; | ||
// import table_entry_type; | ||
// import meta_info; | ||
// import index_base; | ||
// import txn_store; | ||
// import data_access_state; | ||
// import catalog_delta_entry; | ||
// import file_writer; | ||
import extra_ddl_info; | ||
// import index_defines; | ||
// import infinity_context; | ||
// import create_index_info; | ||
// import persistence_manager; | ||
// | ||
// import table_meta; | ||
// import table_index_meta; | ||
// import base_entry; | ||
// import block_entry; | ||
// import block_column_entry; | ||
// import segment_index_entry; | ||
// import chunk_index_entry; | ||
// import log_file; | ||
// import persist_result_handler; | ||
// import local_file_handle; | ||
// import admin_statement; | ||
// import global_resource_usage; | ||
// import snapshot_info; | ||
|
||
namespace infinity { | ||
|
||
Status NewCatalog::CreateDatabase(const SharedPtr<String> &db_name, | ||
const SharedPtr<String> &comment, | ||
TransactionID txn_id, | ||
TxnTimeStamp begin_ts, | ||
ConflictType conflict_type) { | ||
return Status::OK(); | ||
} | ||
|
||
Status NewCatalog::DropDatabase(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts, ConflictType conflict_type) { | ||
return Status::OK(); | ||
} | ||
|
||
bool NewCatalog::CheckDatabaseExists(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts) { return true; } | ||
|
||
Tuple<SharedPtr<DatabaseInfo>, Status> NewCatalog::GetDatabaseInfo(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts) { | ||
return {nullptr, Status::OK()}; | ||
} | ||
|
||
} // namespace infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
// Copyright(C) 2024 InfiniFlow, Inc. All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// https://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
module; | ||
|
||
export module new_catalog; | ||
|
||
|
||
import stl; | ||
import table_def; | ||
//import function; | ||
//import function_set; | ||
//import table_function; | ||
//import special_function; | ||
//import third_party; | ||
//import buffer_manager; | ||
//import profiler; | ||
import status; | ||
//import default_values; | ||
import meta_info; | ||
//import index_base; | ||
//import txn_store; | ||
//import data_access_state; | ||
import extra_ddl_info; | ||
//import db_entry; | ||
//import table_entry; | ||
//import table_index_entry; | ||
//import segment_entry; | ||
//import db_meta; | ||
//import meta_map; | ||
//import base_entry; | ||
//import column_def; | ||
//import cleanup_scanner; | ||
//import log_file; | ||
//import snapshot_info; | ||
|
||
|
||
namespace infinity { | ||
|
||
export struct NewCatalog { | ||
public: | ||
NewCatalog(); | ||
~NewCatalog(); | ||
|
||
public: | ||
// Database related functions | ||
Status CreateDatabase(const SharedPtr<String> &db_name, | ||
const SharedPtr<String> &comment, | ||
TransactionID txn_id, | ||
TxnTimeStamp begin_ts, | ||
ConflictType conflict_type = ConflictType::kError); | ||
|
||
Status DropDatabase(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts, ConflictType conflict_type = ConflictType::kError); | ||
|
||
bool CheckDatabaseExists(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts); | ||
|
||
Tuple<SharedPtr<DatabaseInfo>, Status> GetDatabaseInfo(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts); | ||
|
||
// void RemoveDBEntry(DBEntry *db_entry, TransactionID txn_id); | ||
// | ||
// // replay | ||
// void | ||
// CreateDatabaseReplay(const SharedPtr<String> &db_name, | ||
// const SharedPtr<String> &comment, | ||
// std::function<SharedPtr<DBEntry>(DBMeta *, SharedPtr<String>, SharedPtr<String>, TransactionID, TxnTimeStamp)> | ||
// &&init_entry, TransactionID txn_id, TxnTimeStamp begin_ts); | ||
// | ||
// void DropDatabaseReplay(const String &db_name, | ||
// std::function<SharedPtr<DBEntry>(DBMeta *, SharedPtr<String>, TransactionID, TxnTimeStamp)> &&init_entry, | ||
// TransactionID txn_id, | ||
// TxnTimeStamp begin_ts); | ||
// | ||
// DBEntry *GetDatabaseReplay(const String &db_name, TransactionID txn_id, TxnTimeStamp begin_ts); | ||
}; | ||
|
||
} // namespace infinity |
Oops, something went wrong.