Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: export presence #327

Closed
3 tasks
adrienaury opened this issue Nov 6, 2024 · 0 comments · Fixed by #328
Closed
3 tasks

feat: export presence #327

adrienaury opened this issue Nov 6, 2024 · 0 comments · Fixed by #328
Assignees

Comments

@adrienaury
Copy link
Member

adrienaury commented Nov 6, 2024

Add a new option for export option in table.yaml.

Context

The current export parameter allows configuring different behaviors for exporting data in JSON. A new feature is requested to add a specific behavior that only indicates the presence of a value in the database.

Objective

Create a new presence option for the export parameter with the following behavior:

  • If the database value is null, the JSON output will be "null".
  • If the database value is not null (regardless of the content), the JSON output will be "true".

Usage Examples

// With export: "presence"
{ "field": null } // if the database value is null
{ "field": true } // if the database value is not null

Implementation

Add presence as an available option for the export parameter.
Implement conditional logic to handle null and true in the JSON output depending on the database value presence.

Testing

  • Test the behavior for cases where the database value is null.
  • Test the behavior for cases where the database value is not null.
  • Ensure compatibility of this new option with existing behaviors of the export parameter.
@adrienaury adrienaury self-assigned this Nov 6, 2024
@adrienaury adrienaury linked a pull request Nov 6, 2024 that will close this issue
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 a pull request may close this issue.

1 participant