Skip to content

feat: add more predicates#5

Merged
ya7on merged 8 commits intomasterfrom
more_predicates
Mar 14, 2026
Merged

feat: add more predicates#5
ya7on merged 8 commits intomasterfrom
more_predicates

Conversation

@ya7on
Copy link
Copy Markdown
Owner

@ya7on ya7on commented Mar 13, 2026

No description provided.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 13, 2026

Codecov Report

❌ Patch coverage is 97.36842% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 96.86%. Comparing base (9b30a52) to head (1b6619e).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/types/predicate.rs 96.79% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master       #5      +/-   ##
==========================================
- Coverage   96.88%   96.86%   -0.03%     
==========================================
  Files          13       14       +1     
  Lines        1284     1403     +119     
==========================================
+ Hits         1244     1359     +115     
- Misses         40       44       +4     
Flag Coverage Δ
rust 96.86% <97.36%> (-0.03%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 85ba10d0d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Cargo.toml
name = "darwen"
description = "A relational algebra library for Rust"
version = "1.1.1"
version = "1.2.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Bump major version for expanded public enum

This release adds new Predicate variants (Not, Or, Lt in src/types/predicate.rs), which is a source-breaking API change for downstream crates that exhaustively match on Predicate; publishing it as 1.2.0 can therefore break existing users on a minor upgrade. Please release this as a major version (or otherwise preserve compatibility) so dependent builds are not unexpectedly broken.

Useful? React with 👍 / 👎.

Comment thread src/types/predicate.rs
Comment on lines +59 to +61
impl From<AttributeName> for Expression {
fn from(attr: AttributeName) -> Self {
Expression::Attribute(attr)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Disambiguate String constants in predicate constructors

Because AttributeName is a type alias for String, this From<AttributeName> impl effectively makes every owned String become Expression::Attribute; with the new Predicate::eq/gt/lt helpers, a call like Predicate::eq(AttributeName::from("city"), city_name_string) is interpreted as attribute-vs-attribute and can return Error::InvalidAttribute instead of comparing to a string constant. This is a runtime footgun introduced by the new conversion path and will surprise callers using dynamic string values.

Useful? React with 👍 / 👎.

@ya7on
Copy link
Copy Markdown
Owner Author

ya7on commented Mar 14, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: deadd0cb3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/types/mod.rs
Comment on lines +10 to +11
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct AttributeName(String);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve semver compatibility for AttributeName

Replacing AttributeName from a pub type alias of String to an opaque newtype changes the public API in a source-incompatible way: downstream code that relied on String behavior (as_str, push_str, passing AttributeName to APIs expecting String, trait bounds implemented by String, etc.) will stop compiling. Because this release only bumps from 1.1.1 to 1.2.0, the change is a breaking semver regression unless you either restore string-compatible trait surface (for example via conversion/borrowing traits) or ship it as a major version bump.

Useful? React with 👍 / 👎.

@ya7on
Copy link
Copy Markdown
Owner Author

ya7on commented Mar 14, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: deadd0cb3b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/types/mod.rs
/// The name of an attribute in a heading or tuple.
pub type AttributeName = String;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct AttributeName(String);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve backward compatibility for AttributeName

Replacing AttributeName from a String alias to a newtype here is a breaking public API change for existing 1.x users (for example, code that previously passed String/&String directly to Expression::Attribute, Tuple::get, or Heading::get no longer compiles), but the package version in this commit is only bumped to 1.2.0. That means downstream crates on darwen = "1" can receive compile-time breakage on a normal minor upgrade, so this needs either compatibility shims or a major-version release.

Useful? React with 👍 / 👎.

@ya7on
Copy link
Copy Markdown
Owner Author

ya7on commented Mar 14, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ya7on ya7on force-pushed the more_predicates branch from 725421d to c7aacfc Compare March 14, 2026 13:05
@ya7on ya7on force-pushed the more_predicates branch from c7aacfc to 392b90b Compare March 14, 2026 13:06
@ya7on
Copy link
Copy Markdown
Owner Author

ya7on commented Mar 14, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ya7on ya7on enabled auto-merge (squash) March 14, 2026 13:15
@ya7on ya7on merged commit 41ea153 into master Mar 14, 2026
2 checks passed
@ya7on ya7on deleted the more_predicates branch March 14, 2026 13:15
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.

2 participants