Skip to content

Conversation

@mdroidian
Copy link
Collaborator

@mdroidian mdroidian commented Nov 10, 2025

Summary

  • expand the Datalog predicate expression type to cover the built-in Datascript predicates

Testing

  • not run

Codex Task

Summary by CodeRabbit

  • New Features

    • Expanded Datalog query capabilities to accept many more predicate operators (comparisons, arithmetic, logical, regex, string ops, collection/type checks), enabling richer and more flexible queries.
  • Chores

    • Package version bumped from 0.85.5 to 0.85.6.

@coderabbitai
Copy link

coderabbitai bot commented Nov 10, 2025

Walkthrough

The DatalogPredExpr.pred union type in src/types/native.ts was expanded to include a much larger set of string literal operators (comparison, arithmetic, logical, type/string/collection predicates, regex, namespace-qualified forms, and others).

Changes

Cohort / File(s) Summary
Type Definition Expansion
src/types/native.ts
Expanded DatalogPredExpr.pred to accept a significantly larger union of string literal operators, adding many comparison, arithmetic, logical, regex, type/collection, string-manipulation, and namespace-qualified predicates.
Version Bump
package.json
Updated package version from 0.85.5 to 0.85.6.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

  • Single primary file change is a declarative type expansion.
  • Minor package.json version bump.
  • Review focus: ensure the new literal list is intentional and correctly formatted.

Possibly related issues

Poem

🐰 I nibble at predicates, wide and new,
From equals to regex, a colorful stew.
Types expanded, hopping through the trees,
Datalog blossoms on every breeze. 🌿✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly describes the main change: expanding Datalog predicate expression coverage in the type system.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch codex/add-missing-predicates-to-datalogpredexpr

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0d88dbb and dbc1b1d.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • package.json

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mdroidian mdroidian changed the title Expand Datalog predicate expression coverage Expand Datalog predicate expression coverage (Closes #49) Nov 10, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f4ce223 and 0d88dbb.

📒 Files selected for processing (1)
  • src/types/native.ts (1 hunks)
🔇 Additional comments (1)
src/types/native.ts (1)

142-142: Clarify the distinction between pred and fn for overlapping operators.

Both get (line 142) and re-pattern (line 150) appear in the DatalogPredExpr.pred union, but they also exist in DatalogFnExpr.fn (line 167).

Please clarify:

  • When should these be used as predicates vs. functions?
  • Is the distinction that DatalogFnExpr includes explicit binding while DatalogPredExpr does not?

Understanding this will help ensure correct usage throughout the codebase.

Also applies to: 150-150, 167-167

@mdroidian mdroidian merged commit b038199 into main Nov 10, 2025
2 checks passed
@mdroidian mdroidian deleted the codex/add-missing-predicates-to-datalogpredexpr branch November 10, 2025 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants