Open dmitry-lipetsk opened 3 years ago
Since this is new API, unlikely to happen in 6.0 (too late in release), so for 6.0 you should override VisitSelect and copy paste the method body. The new API will be available from 7.0
Since this is new API, unlikely to happen in 6.0 (too late in release), so for 6.0 you should override VisitSelect and copy paste the method body.
Ok. Already done.
Sorry that I not inform about this problem early.
You may close this issue.
Firebird DBMS (v3) has some limitation for arguments of "OFFSET" and "FETCH" in "SELECT" statement - it does not support expressions like "CAST(@param AS INTEGER)"
But it (Firebird) has alternative syntax:
without these limitations.
I not see in current EFCore an any legal way for generation of SQL with FIRST and SKIP:
https://github.com/dotnet/efcore/blob/a0bb25fec68c07e7c123ffba28224548099f4ea9/src/EFCore.Relational/Query/QuerySqlGenerator.cs#L174-L181
Could you move line with
into separated new virtual function GenerateSelect?
I will override this function and append the generation of FIRST, SKIP.
Firebird DBMS supports an additional variant for this task - ROWS. Native Firebird provider for EFCore uses this statement in their code.
But usage of "ROWS" requires additional "+1" and uses long.MaxValue for describing unlimited number, so it looks less preferred than "FIRST/SKIP".
Of course, I may copy the body of QuerySqlGenerator.VisitSelect into my code (this is my current variant) and resolve this problem, but may be new method "GenerateSelect" will be usefully into another tasks.
Thanks.