Skip to content

What is the point of both build and build_any? #139

Answered by tyt2y3
tqwewe asked this question in Q&A
Discussion options

You must be logged in to vote

build is static dispatch, while build_any is dynamic dispatch. So if the user only ever uses one database variant, they'd simply call build.
The any is only useful for this case where the QueryBuilderBackend can be swapped runtime.
But even SeaORM uses a enum and match statement, so I guess 'in the wild usage' is rare.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by billy1624
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