xorm/integrations
finelog 7802393d01
Some checks failed
continuous-integration/drone/push Build is failing
fix reset colmap when counting distinct cols (#2096)
when using distinct cols with FindAndCount, reset statement.ColumnMap will make the counting sql an syntax error, this pr try fix this.
is this pr ok for merge?

error sql logging:
```sql
[SQL] SELECT DISTINCT `Fid` FROM `table_demo` WHERE Fkey = ? [val]

[SQL] SELECT count(DISTINCT ) FROM `table_demo` WHERE Fkey = ? [val]
```

after fix:
```sql
[SQL] SELECT DISTINCT `Fid` FROM `table_demo` WHERE Fkey = ? [val]

[SQL] SELECT count(DISTINCT `Fid`) FROM `table_demo` WHERE Fkey = ? [val]
```

Co-authored-by: finelog <kaicltw@gmail.com>
Reviewed-on: #2096
Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: finelog <finelog@noreply.gitea.io>
Co-committed-by: finelog <finelog@noreply.gitea.io>
2022-01-25 11:09:41 +08:00
..
testdata Fix import file bug (#2025) 2021-08-06 11:26:22 +08:00
cache_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
engine_dm_test.go Add dameng support (#2007) 2021-08-24 13:46:08 +08:00
engine_group_test.go Move all integrations tests to a standalone sub package (#1635) 2020-03-27 07:13:04 +00:00
engine_test.go Escape string and blob results from dump more correctly (#2091) 2022-01-07 16:04:01 +08:00
main_test.go Move all integrations tests to a standalone sub package (#1635) 2020-03-27 07:13:04 +00:00
performance_test.go Some performance optimization for get (#2043) 2021-09-07 16:03:08 +08:00
processors_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
rows_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_cols_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_cond_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_count_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_delete_test.go Some performance optimization for get (#2043) 2021-09-07 16:03:08 +08:00
session_exist_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_find_test.go fix reset colmap when counting distinct cols (#2096) 2022-01-25 11:09:41 +08:00
session_get_test.go New Prepare useage (#2061) 2021-10-20 08:53:30 +08:00
session_insert_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
session_iterate_test.go Fix bug of Rows (#2048) 2021-09-16 23:59:36 +08:00
session_pk_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
session_query_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_raw_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_schema_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
session_sum_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00
session_tx_test.go Add dameng support (#2007) 2021-08-24 13:46:08 +08:00
session_update_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
tags_test.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
tests.go Add README and fix some lints (#2079) 2021-12-14 09:00:35 +08:00
time_test.go Add dameng support (#2007) 2021-08-24 13:46:08 +08:00
types_null_test.go Add dameng support (#2007) 2021-08-24 13:46:08 +08:00
types_test.go Drop sync function and rename sync2 to sync (#2018) 2021-08-24 17:13:17 +08:00