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

Add toJson() for result class #3060

Open
andim27 opened this issue Jun 24, 2024 · 1 comment
Open

Add toJson() for result class #3060

andim27 opened this issue Jun 24, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@andim27
Copy link

andim27 commented Jun 24, 2024

Pleas add if it is possible to generated classes(*.g.dart) .toJson() method
class MyTableItemsResult { fields ... toJson(){..return all fields in json format} }

@andim27 andim27 added the enhancement New feature or request label Jun 24, 2024
@simolus3
Copy link
Owner

For what do you need json serialization here? You can probably get close to this already by enabling the raw_result_set_data builder option. Then you can use QueryRow.data to get access to the underlying fields.

If you need more complex serialization features, I suggest writing your own data class and then using custom result classes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants