xorm/internal/statements
FlyingOnion 551de3767c modify limit offset implement (#2188)
Oracle and SQLServer specific: When `LIMIT OFFSET` function is needed, use `OFFSET <offset> ROWS FETCH NEXT <limit> ROWS ONLY` to replace legacy subquery.

SQLServer specific: When `ORDER BY` is not set and `OFFSET FETCH` is set, set `statement.orderStr` to `1` (`ORDER BY 1`). See [here](https://learn.microsoft.com/zh-cn/sql/t-sql/queries/select-order-by-clause-transact-sql?view=sql-server-ver16).

MySQL specific: When limit is 0 and offset > 0, use `LIMIT 9223372036854775807` ($2^{63}-1$). See comments [here](15d171ea55/internal/statements/query.go (L314)).

Reviewed-on: https://gitea.com/xorm/xorm/pulls/2188
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: FlyingOnion <731677080@qq.com>
Co-committed-by: FlyingOnion <731677080@qq.com>
2023-09-20 02:07:03 +00:00
..
cache.go some optimzation (#2272) 2023-06-02 14:16:30 +00:00
column_map.go Fix map with cols (#1575) 2020-03-06 08:55:12 +00:00
cond.go Refactor orderby and support arguments (#2150) 2022-05-31 11:00:28 +08:00
delete.go Delete Limit with start will return error because it's not supported by database (#1895) 2023-07-26 06:58:55 +00:00
expr.go fix lint (#1953) 2021-06-15 20:28:49 +08:00
insert.go refactor write insert sql (#2302) 2023-07-22 15:24:19 +00:00
join.go refactor write insert sql (#2302) 2023-07-22 15:24:19 +00:00
legacy_select.go modify limit offset implement (#2188) 2023-09-20 02:07:03 +00:00
order_by.go Check orderby validate (#2313) 2023-07-25 14:02:38 +00:00
pk.go Fix bug when ID used but no reference table given (#1709) 2020-06-13 01:20:25 +00:00
query.go modify limit offset implement (#2188) 2023-09-20 02:07:03 +00:00
select.go Fix join problem (#2291) 2023-07-12 02:01:56 +00:00
statement.go Exec support conversion data (#1970) 2023-08-07 10:54:57 +00:00
statement_args.go Remove const insertSelectPlaceholder and associated dead code (#2151) 2022-05-30 00:29:03 +08:00
statement_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
table_name.go Refactor orderby and support arguments (#2150) 2022-05-31 11:00:28 +08:00
update.go Refactor write update (#2310) 2023-07-25 10:49:55 +00:00
values.go Move convert back to xorm.io/xorm/convert (#2030) 2021-08-10 23:20:53 +08:00