Replace sorting behavior

Feature(s) impacted

Observed behavior

When i use collection.replaceFieldSorting('f', null) the sorting is not disabled.
Instead it tells the agent to emulate sorting for that column.

Either the documentation or behavior is wrong :slight_smile:

Expected behavior

documentation to match behavior

Failure Logs

none

Context

  • Project name: roundtable
  • Team name: operations
  • Environment name: all
  • Agent (forest package) name & version: latest agent nodejs
  • Database type: postgres
  • Recent changes made on your end if any: none relevant

Hello @Romain_Gilliotte :wave:

Indeed the documentation and function are not behaving as expected, we’re releasing a fix as well as updating the documentation to offer a proper disableFieldSorting function.

I’ll get back to you once the fix is released.

Best regards,

The documentation has been updated and you should be able to use the new function with the latest version of @forestadmin/agent :tada:

thanks @dogan.ay and @morganperre !

Adding this new method is clearer and makes the API better.
However, it creates an inconsistency with the other customizations :slight_smile:

Thanks @Romain_Gilliotte !
You are more than right about this consistency issue.

Let’s revamp this to add a proper simple API to handle those, it should look like this:

  • Disabling operatorsdisableFieldOperator(name, operator)
  • Making a field read-onlydisableFieldWriting(name)

We will get back to you once done. :muscle:

Kind regards @Romain_Gilliotte,
Morgan