Is it possible to override some drift query building logic ? #3067
-
I made a MSSQL plugin to work with drift and it works quite well. But i have one issue around drift's query building, specifically the use of limit for example:
My plugin is meant to work for sqlExpress which does not support the "limit" clause instead using "Top". So as a workaround I could manipulate the query that drift builds using string manipulation prior to sending it off to my Db. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Drift doesn't allow patching the behavior of builtin clauses like However, I'm happy to take contributions expanding drift support for different dialects. We define a dialect enum here. drift/drift/lib/src/runtime/query_builder/query_builder.dart Lines 95 to 98 in 06dbcc7 This could be expanded to include MSSQL-specific dialects, the implementation of the limit clause ( |
Beta Was this translation helpful? Give feedback.
Drift doesn't allow patching the behavior of builtin clauses like
LIMIT
from outside of the package.However, I'm happy to take contributions expanding drift support for different dialects. We define a dialect enum here.
drift/drift/lib/src/runtime/query_builder/query_builder.dart
Lines 95 to 98 in 06dbcc7
This could be expanded to include MSSQL-specific dialects, the implementation of the limit clause (
query_builder/components/limit.dart
) could then be changed to be aw…