Skip to content

2.1 - feat: computed expressions and expression-based updates PR #31#32

Merged
flyon merged 10 commits intomainfrom
dev
Mar 12, 2026
Merged

2.1 - feat: computed expressions and expression-based updates PR #31#32
flyon merged 10 commits intomainfrom
dev

Conversation

@flyon
Copy link
Member

@flyon flyon commented Mar 12, 2026

Properties in select() and update() now support expressions — you can compute values dynamically instead of just reading or writing raw fields.

Computed fields in queries — chain methods like .strlen(), .times(), .ucase(), .year() on properties inside select() to derive new values on the fly
Expression-based WHERE filters — filter using computed conditions (p.name.strlen().gt(5)), not just equality. Works on queries, updates, and deletes
Computed updates — calculate new values from existing ones in update queries (p.age.plus(1)) instead of providing static values
Expr module — standalone expressions that don't start from a property: Expr.now(), Expr.ifThen(), Expr.firstDefined()

René Verheij and others added 10 commits March 11, 2026 17:02
…regate group filtering. The new docs outline the implementation of computed query fields, fluent datatype-aware property methods, and introduce a separate design for aggregate group filtering with HAVING semantics.
Move reusable skills to github.com/Semantu/agents (checked out via mrgit
into packages/skills). Sync script now lives in the skills repo itself.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
npm run setup now clones/pulls the agents repo into packages/skills
and runs sync. Skips gracefully if the user lacks repo access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract skills to external agents repo
Add fluent expression methods on property proxies (.plus(), .strlen(), .gt(),
etc.) for computed SELECT projections and expression-based WHERE filters.
Add Expr module for standalone expressions (Expr.now(), Expr.ifThen(),
Expr.firstDefined()). Add expression-based mutations via callback form.

Includes shared createTraversalResolver factory, README documentation,
comprehensive test coverage (821 tests passing), and cleanup of stale
changesets already processed on dev.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rewrite expression sections for clarity — lead with what users can do,
move method reference to a table, drop SPARQL jargon. Update shape
examples to use schema.Person dot notation instead of schema('Person')
function calls. Add schema.org ontology file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace fake schema.org ontology with honest example using
createNameSpace('https://example.org/') and an ex object pattern.
Delete src/ontologies/schema.ts — the library doesn't ship schema.org.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Properties in select() and update() now support expressions — you can compute values dynamically instead of just reading or writing raw fields.

    Computed fields in queries — chain methods like .strlen(), .times(), .ucase(), .year() on properties inside select() to derive new values on the fly
    Expression-based WHERE filters — filter using computed conditions (p.name.strlen().gt(5)), not just equality. Works on queries, updates, and deletes
    Computed updates — calculate new values from existing ones in update queries (p.age.plus(1)) instead of providing static values
    Expr module — standalone expressions that don't start from a property: Expr.now(), Expr.ifThen(), Expr.firstDefined()
@flyon flyon merged commit 02fa3ad into main Mar 12, 2026
6 checks passed
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