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
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ Never mark a task done while tests are failing.

## Implementation notes

### v_object constructor conventions

Types derived from `v_object` should follow the project-wide constructor pattern:

- New durable instances are constructed from `Memspace &` plus any type-specific creation arguments.
- Existing durable instances are reopened from `mptr` plus any type-specific runtime dependencies.

### C++ style

- Use camelCase for local helper variables, lambdas, and method names in C++ code.
Expand Down
2 changes: 1 addition & 1 deletion dbzero/dbzero/dbzero.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def load_dynamic(name, path):

def __bootstrap__():
global __bootstrap__, __loader__, __file__
paths = [os.path.join(os.path.split(__file__)[0]), "/src/dev/build/release", "/usr/local/lib/python3/dist-packages/dbzero/"]
paths = [os.path.join(os.path.split(__file__)[0]), "/src/dev/build/", "/usr/local/lib/python3/dist-packages/dbzero/"]
__file__ = None
for path in paths:
if os.path.isdir(path):
Expand Down
4 changes: 3 additions & 1 deletion src/dbzero/object_model/class.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@
#include "class/Class.hpp"
#include "class/ClassFactory.hpp"
#include "class/Field.hpp"
#include "class/Schema.hpp"
#include "class/FieldIDMapper.hpp"
#include "class/FieldMask.hpp"
#include "class/Schema.hpp"
6 changes: 5 additions & 1 deletion src/dbzero/object_model/class/FieldID.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ namespace db0::object_model
public:
static constexpr std::uint32_t MAX_INDEX = 0x40000 - 1; // max 2^22 fields
static constexpr std::uint32_t MAX_OFFSET = 0x40 - 1;

static constexpr std::uint32_t getClusterSize() {
return MAX_OFFSET + 1;
}

FieldID() = default;
FieldID(std::pair<std::uint32_t, std::uint32_t> loc) {
Expand Down Expand Up @@ -88,4 +92,4 @@ namespace std

std::ostream &operator<<(std::ostream &os, const db0::object_model::FieldID &field_id);

}
}
Loading
Loading