Skip to content

Configurable deep value per scope and change default #261

@joente

Description

@joente

Is your feature request related to a problem? Please describe.
The deep value is not well understood by new users and the deep value of 1 is not as important as this was in early versions of ThingsDB. This is because ThingsDB currently is protected against large results, and also does not "unpack" nested self references.

If we however, want to change the default deep value, we should not change this value for existing installations but ThingsDB should have an option to manually change the setting to make this possible for users.

Describe the solution you'd like
Create a set_default_deep(..) function which changes the deep value for a given scope. The default deep will be 127 for new installations for both the @thingsdb and @node scope. New collections should inherit deep from the @thingsdb scope. Existing installations should keep the deep value 1 as this otherwise would break stuff.

Functions like json_dump() and emit() etc. should use the current deep value as default.

Describe alternatives you've considered
As an alternative, we could use 1 as default deep value. For new users however, the concept of deep does not feel natural so using 127 is probably easier.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions