diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-03-03 00:09:46 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-03 00:09:46 -0300 |
| commit | 24e5e531134fbb8757151a68438d0b8426c91c4c (patch) | |
| tree | db53b9fb5392541a71f8df02282bb392ec80914c /include/operations.hrl | |
| parent | baca3a79cded23329ba8555afefb5590b679c955 (diff) | |
| download | Sakura-24e5e531134fbb8757151a68438d0b8426c91c4c.tar.gz Sakura-24e5e531134fbb8757151a68438d0b8426c91c4c.zip | |
2OP Constraints and manipulation
Diffstat (limited to 'include/operations.hrl')
| -rw-r--r-- | include/operations.hrl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/operations.hrl b/include/operations.hrl index 2afb27b..f6fa4c0 100644 --- a/include/operations.hrl +++ b/include/operations.hrl @@ -30,15 +30,21 @@ %% Attribute constraint (1OP - 1st Order Property) %% Constrains values of a specific attribute in a relation -record(attribute_constraint, { + name :: atom(), % Stable identifier for lifecycle ops attribute :: atom(), % Attribute name (e.g., salary) domain :: atom() | #relation{}, % Domain or relation this attribute draws from constraints :: [term()] % Additional relational constraints beyond domain membership }). +-record(tuple_constraint, { + name :: atom(), % Stable identifier for lifecycle ops + constraints :: [term()] +}). + %% Relation constraints - holds all types of constraints for a relation -record(relation_constraints, { - attribute_constraints :: #{atom() => #attribute_constraint{}}, % 1OPs - attribute constraints - tuple_constraints :: [term()], % 2OPs - inter-attribute constraints (future) + attribute_constraints :: #{atom() => [#attribute_constraint{}]}, % 1OPs - per-attribute named constraints + tuple_constraints :: [#tuple_constraint{}], % 2OPs - inter-attribute constraints multi_tuple_constraints :: [term()] % 3OPs - multi-tuple constraints (future) }). @@ -101,4 +107,3 @@ | {sort, fun(), lineage_op()} % Sort operation | {take, pos_integer(), lineage_op()} % Limit operation | {aggregate, atom(), atom(), lineage_op()}. % Aggregation (future) - |
