Skip to content

Add isClean entity state checks - #344

Open
elpete wants to merge 1 commit into
nextfrom
feat/50-is-clean
Open

Add isClean entity state checks#344
elpete wants to merge 1 commit into
nextfrom
feat/50-is-clean

Conversation

@elpete

@elpete elpete commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Closes #50

Issue review

Recommendation: 10/10 — implement. isClean makes the inverse state check readable and avoids repeated negation throughout consuming applications. Supporting one alias or column is especially useful for conditional work tied to a specific field. This is additive and low risk.

Implementation

  • adds isClean() for whole-entity state
  • adds isClean(attribute) for a Quick alias or physical column
  • uses the same case-sensitive attribute hashing semantics as isDirty
  • validates unknown attributes through the normal Quick error path

Test-first evidence

The public regression initially errored with QuickMissingMethod. It now covers a fully clean entity, clean alias and physical-column checks, whole-entity dirtiness after a change, the changed field becoming unclean, and an unrelated field remaining clean.

Review note

This PR is independently mergeable against next. PR #343 adds the complementary optional-attribute support to isDirty; if both are merged, a small follow-up refactor could share their per-attribute comparison helper, but neither PR depends on the other.

Validation

  • focused IsDirtySpec: 2 passed, 0 failed, 0 errors
  • full Lucee 6 suite: 496 passed, 0 failed, 0 errors, 3 skipped
  • box run-script format
  • git diff --check

Uses qb@14.0.0-beta.3.

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