Skip to content

Search best practice - export from moor db nested json for external REST API #1279

Answered by simolus3
AlexKenbo asked this question in Q&A
Discussion options

You must be logged in to vote

Type converters apply to individual columns, not to table relationships. If you want to use multiple tables, type converters are probably not the best approach here. I think I'd go into the direction of using an own model for the request. SQL can be a bit tricky when fetching nested data structures, but doing multiple selects isn't expensive with SQLite.
If you already have model classes for the request, you may be able to integrate them into moor by using custom row classes. But in general the "method with own model" suggestion you made sounds reasonable to me.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@AlexKenbo
Comment options

@simolus3
Comment options

Answer selected by AlexKenbo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants