Skip to content

feat: schema indexes, primary keys, default values, nullable trait#32

Merged
paulocoghi merged 8 commits into
masterfrom
feat-schema-extensions
Jul 9, 2026
Merged

feat: schema indexes, primary keys, default values, nullable trait#32
paulocoghi merged 8 commits into
masterfrom
feat-schema-extensions

Conversation

@paulocoghi

Copy link
Copy Markdown
Member

No description provided.

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (011641b) to head (fb6e773).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #32   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           35        35           
  Lines         1172      1213   +41     
  Branches         4         4           
=========================================
+ Hits          1172      1213   +41     
Flag Coverage Δ
unittests 100.00% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/adapter/memory.cr 100.00% <100.00%> (ø)
src/schema/base.cr 100.00% <100.00%> (ø)
src/schema/formats/uuid.cr 100.00% <100.00%> (ø)
src/schema/validator.cr 100.00% <100.00%> (ø)
src/service/query.cr 100.00% <100.00%> (ø)

- Change FieldDescriptor from struct to class
- Avoid array copy in norm_required_on
- Named tuple for resolve_format
- UUID format: simplify double negation
- Direct case/when for FieldType instead of .to_s.capitalize
- Use ensure in _validate for path.pop
- Hoist method.try(&.create?) / &.write?
- Avoid extra hash lookup after default injection
- @[AlwaysInline] for check_type and required?
- find_field zero-allocation rewrite
- Simplify parse_positive_int
@paulocoghi
paulocoghi merged commit 8eb96ae into master Jul 9, 2026
4 checks passed
@paulocoghi
paulocoghi deleted the feat-schema-extensions branch July 9, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant