Feature #998
closedAllow rows ? (to ?) sql clause in Query.C and Query_impl.h (not only offset and limit)
0%
Description
I have changed a little class Query to allow processing of Firebird 2.1 (and up). The change is about to be limit and offset select statement.
In Firebird 2.1 (and up) you have to use ROWS statement like:
select * from mir_something rows 1 to 20
ROWS A TO B (where A > 0 and B > 0).
Typical change would be to allow Query to use ROWS instead limit and offset. For example simply add a method:
void useROWSInSELECT(bool queryIsUsingROWS);
and then use SELECT with ROWS subclause if queryIsUsingROWS == true (otherwise use limit and offset).
Subclassing would be a little overhead.
BR,
Łukasz Matuszewski
Files
Updated by Łukasz Matuszewski about 13 years ago
Actually mir_firebird.cpp should be a little modified to be purely using ibpp.h - which is a C library for Firebird (now it uses my wrapper DatabaseModule and its types (found somewhere else in this forum :)))
Updated by Koen Deforche about 13 years ago
- Status changed from New to InProgress
- Assignee set to Koen Deforche
Hey Lukasz,
It sounds that we should provide a dialect option to indicate how the (indeed non-SQL standard function of) offset and limit is supported ?
Do you have any plans for releasing and supporting the firebird sql connector, btw ?
Regards,
koen
Updated by Łukasz Matuszewski about 13 years ago
Do you have any plans for releasing and supporting the firebird sql connector, btw ?
Yes i have, but using ibpp Firebird library.
Yes a dialect option would be perfect (to switch between ROWS / LIMIT OFFSET subclause).
BR,
Lukasz Matuszewski
Updated by Koen Deforche about 13 years ago
- Status changed from InProgress to Resolved
- Target version set to 3.2.0
Hey Lukasz,
I've added this dialect option to SqlConnection, but haven't actually tested the "rows ? to ?" variant...
Pending a push to the git repository.
Regards,
koen
Updated by Koen Deforche almost 13 years ago
- Status changed from Resolved to Closed