Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 11 additions & 20 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,25 +232,16 @@ include_directories(
)

# Core library
add_library(core
src/core.cpp
src/query.cpp
src/query_execution.cpp
src/join.cpp
src/row.cpp
src/shard.cpp
src/storage.cpp
src/metadata.cpp

src/snapshot_manager.cpp
src/edge_store.cpp
src/table_info.cpp
src/utils.cpp
src/schema.cpp
src/arrow_utils.cpp
src/types.cpp
src/clock.cpp
)
add_library(core)

# Per-domain source directories
add_subdirectory(src/common)
add_subdirectory(src/arrow)
add_subdirectory(src/schema)
add_subdirectory(src/core)
add_subdirectory(src/storage)
add_subdirectory(src/query)
add_subdirectory(src/main)

target_include_directories(core
PUBLIC
Expand Down Expand Up @@ -384,7 +375,7 @@ if(TUNDRADB_BUILD_SHELL)
endif()

# Interactive shell executable
add_executable(tundra_shell src/tundra_shell.cpp libs/linenoise/linenoise.c)
add_executable(tundra_shell apps/tundra_shell.cpp libs/linenoise/linenoise.c)

target_include_directories(tundra_shell
PRIVATE
Expand Down
12 changes: 6 additions & 6 deletions src/tundra_shell.cpp → apps/tundra_shell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@
#include "TundraQLBaseVisitor.h"
#include "TundraQLLexer.h"
#include "TundraQLParser.h"
#include "arrow_map_union_types.hpp"
#include "constants.hpp"
#include "core.hpp"
#include "arrow/map_union_types.hpp"
#include "common/constants.hpp"
#include "main/database.hpp"
#include "linenoise.h"
#include "logger.hpp"
#include "types.hpp"
#include "utils.hpp"
#include "common/logger.hpp"
#include "common/types.hpp"
#include "common/utils.hpp"

// Tee stream class that outputs to both console and file
class TeeStream : public std::ostream {
Expand Down
6 changes: 3 additions & 3 deletions bench/tundra_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <memory>
#include <string>

#include "../include/core.hpp"
#include "../include/query.hpp"
#include "../include/types.hpp"
#include "main/database.hpp"
#include "query/query.hpp"
#include "common/types.hpp"

using namespace tundradb;

Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion include/arrow_utils.hpp → include/arrow/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <string>
#include <vector>

#include "types.hpp"
#include "common/types.hpp"

namespace tundradb {

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions include/types.hpp → include/common/types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
// Arrow includes for type conversion functions
#include <arrow/api.h>

#include "array_ref.hpp"
#include "map_ref.hpp"
#include "string_arena.hpp"
#include "memory/array_ref.hpp"
#include "memory/map_ref.hpp"
#include "memory/string_arena.hpp"

namespace tundradb {

Expand Down
12 changes: 6 additions & 6 deletions include/utils.hpp → include/common/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#include <string>
#include <unordered_set>

#include "arrow_utils.hpp"
#include "constants.hpp"
#include "logger.hpp"
#include "node.hpp"
#include "query.hpp"
#include "types.hpp"
#include "arrow/utils.hpp"
#include "common/constants.hpp"
#include "common/logger.hpp"
#include "core/node.hpp"
#include "query/query.hpp"
#include "common/types.hpp"

namespace tundradb {

Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions include/edge.hpp → include/core/edge.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
#include <utility>
#include <vector>

#include "constants.hpp"
#include "edge_view.hpp"
#include "node_arena.hpp"
#include "schema.hpp"
#include "schema_layout.hpp"
#include "temporal_context.hpp"
#include "types.hpp"
#include "update_type.hpp"
#include "common/constants.hpp"
#include "core/edge_view.hpp"
#include "memory/node_arena.hpp"
#include "schema/schema.hpp"
#include "memory/schema_layout.hpp"
#include "query/temporal_context.hpp"
#include "common/types.hpp"
#include "core/update_type.hpp"

namespace tundradb {
class Edge {
Expand Down
12 changes: 6 additions & 6 deletions include/edge_store.hpp → include/core/edge_store.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
#include <unordered_map>
#include <vector>

#include "concurrency.hpp"
#include "edge.hpp"
#include "node_arena.hpp"
#include "schema.hpp"
#include "schema_layout.hpp"
#include "utils.hpp"
#include "common/concurrency.hpp"
#include "core/edge.hpp"
#include "memory/node_arena.hpp"
#include "schema/schema.hpp"
#include "memory/schema_layout.hpp"
#include "common/utils.hpp"

namespace tundradb {

Expand Down
6 changes: 3 additions & 3 deletions include/edge_view.hpp → include/core/edge_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

#include <unordered_map>

#include "node_arena.hpp"
#include "schema.hpp"
#include "types.hpp"
#include "memory/node_arena.hpp"
#include "schema/schema.hpp"
#include "common/types.hpp"

namespace tundradb {

Expand Down
6 changes: 3 additions & 3 deletions include/field_update.hpp → include/core/field_update.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
#include <string>
#include <vector>

#include "schema.hpp"
#include "types.hpp"
#include "update_type.hpp"
#include "schema/schema.hpp"
#include "common/types.hpp"
#include "core/update_type.hpp"

namespace tundradb {

Expand Down
16 changes: 8 additions & 8 deletions include/node.hpp → include/core/node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
#include <string>
#include <unordered_map>

#include "constants.hpp"
#include "logger.hpp"
#include "node_arena.hpp"
#include "node_view.hpp"
#include "schema.hpp"
#include "temporal_context.hpp"
#include "types.hpp"
#include "update_type.hpp"
#include "common/constants.hpp"
#include "common/logger.hpp"
#include "memory/node_arena.hpp"
#include "core/node_view.hpp"
#include "schema/schema.hpp"
#include "query/temporal_context.hpp"
#include "common/types.hpp"
#include "core/update_type.hpp"

namespace tundradb {

Expand Down
8 changes: 4 additions & 4 deletions include/node_view.hpp → include/core/node_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

#include <unordered_map>

#include "node_arena.hpp"
#include "schema.hpp"
#include "temporal_context.hpp"
#include "types.hpp"
#include "memory/node_arena.hpp"
#include "schema/schema.hpp"
#include "query/temporal_context.hpp"
#include "common/types.hpp"

namespace tundradb {

Expand Down
File renamed without changes.
28 changes: 14 additions & 14 deletions include/core.hpp → include/main/database.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
#include <unordered_map>
#include <vector>

#include "arrow_utils.hpp"
#include "config.hpp"
#include "edge_store.hpp"
#include "field_update.hpp"
#include "logger.hpp"
#include "metadata.hpp"
#include "node.hpp"
#include "query.hpp"
#include "query_execution.hpp"
#include "schema.hpp"
#include "shard.hpp"
#include "snapshot_manager.hpp"
#include "storage.hpp"
#include "utils.hpp"
#include "arrow/utils.hpp"
#include "common/config.hpp"
#include "core/edge_store.hpp"
#include "core/field_update.hpp"
#include "common/logger.hpp"
#include "storage/metadata.hpp"
#include "core/node.hpp"
#include "query/query.hpp"
#include "query/execution.hpp"
#include "schema/schema.hpp"
#include "storage/shard.hpp"
#include "storage/snapshot_manager.hpp"
#include "storage/storage.hpp"
#include "common/utils.hpp"

namespace tundradb {

Expand Down
8 changes: 4 additions & 4 deletions include/array_arena.hpp → include/memory/array_arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include <mutex>
#include <new>

#include "array_ref.hpp"
#include "free_list_arena.hpp"
#include "string_ref.hpp"
#include "value_type.hpp"
#include "memory/array_ref.hpp"
#include "memory/free_list_arena.hpp"
#include "memory/string_ref.hpp"
#include "common/value_type.hpp"

namespace tundradb {

Expand Down
4 changes: 2 additions & 2 deletions include/array_ref.hpp → include/memory/array_ref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#include <cstring>
#include <type_traits>

#include "constants.hpp"
#include "value_type.hpp"
#include "common/constants.hpp"
#include "common/value_type.hpp"

namespace tundradb {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
#include <set>
#include <vector>

#include "logger.hpp"
#include "mem_arena.hpp"
#include "mem_utils.hpp"
#include "common/logger.hpp"
#include "memory/mem_arena.hpp"
#include "memory/mem_utils.hpp"

namespace tundradb {

Expand Down
12 changes: 6 additions & 6 deletions include/map_arena.hpp → include/memory/map_arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
#include <mutex>
#include <new>

#include "array_ref.hpp"
#include "free_list_arena.hpp"
#include "map_ref.hpp"
#include "string_ref.hpp"
#include "types.hpp"
#include "value_type.hpp"
#include "memory/array_ref.hpp"
#include "memory/free_list_arena.hpp"
#include "memory/map_ref.hpp"
#include "memory/string_ref.hpp"
#include "common/types.hpp"
#include "common/value_type.hpp"

namespace tundradb {

Expand Down
6 changes: 3 additions & 3 deletions include/map_ref.hpp → include/memory/map_ref.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
#include <cstring>
#include <type_traits>

#include "constants.hpp"
#include "string_ref.hpp"
#include "value_type.hpp"
#include "common/constants.hpp"
#include "memory/string_ref.hpp"
#include "common/value_type.hpp"

namespace tundradb {

Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions include/memory_arena.hpp → include/memory/memory_arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#include <memory>
#include <vector>

#include "mem_arena.hpp"
#include "mem_utils.hpp"
#include "memory/mem_arena.hpp"
#include "memory/mem_utils.hpp"

namespace tundradb {

Expand Down
22 changes: 11 additions & 11 deletions include/node_arena.hpp → include/memory/node_arena.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
#include <string>
#include <unordered_map>

#include "array_arena.hpp"
#include "clock.hpp"
#include "field_update.hpp"
#include "free_list_arena.hpp"
#include "map_arena.hpp"
#include "mem_arena.hpp"
#include "memory_arena.hpp"
#include "schema_layout.hpp"
#include "string_arena.hpp"
#include "types.hpp"
#include "update_type.hpp"
#include "memory/array_arena.hpp"
#include "common/clock.hpp"
#include "core/field_update.hpp"
#include "memory/free_list_arena.hpp"
#include "memory/map_arena.hpp"
#include "memory/mem_arena.hpp"
#include "memory/memory_arena.hpp"
#include "memory/schema_layout.hpp"
#include "memory/string_arena.hpp"
#include "common/types.hpp"
#include "core/update_type.hpp"

namespace tundradb {

Expand Down
12 changes: 6 additions & 6 deletions include/schema_layout.hpp → include/memory/schema_layout.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
#include <unordered_map>
#include <vector>

#include "array_ref.hpp"
#include "memory/array_ref.hpp"
#include "llvm/ADT/StringMap.h"
#include "map_ref.hpp"
#include "mem_utils.hpp"
#include "schema.hpp"
#include "type_descriptor.hpp"
#include "types.hpp"
#include "memory/map_ref.hpp"
#include "memory/mem_utils.hpp"
#include "schema/schema.hpp"
#include "schema/type_descriptor.hpp"
#include "common/types.hpp"

namespace tundradb {

Expand Down
Loading
Loading