agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

AgExpression internal cleanup #649

Closed andrus closed 11 months ago

andrus commented 11 months ago

This task is to do some internal cleanup of the AgExpression:

  1. AgExpression.wrapParameterValue() should not check for Jackson TextNode. This is too specific. The expression should not care about JSON node values
  2. AgExpression.wrapParameterValue() should wrap everything it returns in ExpScalar
  3. AgExpression.namedParams() should not throw when some parameters are missing. It should return a partially substituted copy instead
  4. AgExpression.shallowCopy() produces nodes whose toString() throws an NPE. fix "toString"
  5. Expand the test suite for prune / no-prune conditions
  6. ExpSubstring returned ExpSubtract from "shallowCopy" (a bug)
  7. SimpleNode / AgExpression separation is artificial. Let's combine them in a single class (SimpleNode)