Skip to content

[Improvement-18249][DAO] Route DataSourceMapper and DataSourceUserMapper access through repository Dao#18259

Merged
SbloodyS merged 1 commit into
apache:devfrom
ruanwenjun:dao/datasource-and-datasource-user
May 18, 2026
Merged

[Improvement-18249][DAO] Route DataSourceMapper and DataSourceUserMapper access through repository Dao#18259
SbloodyS merged 1 commit into
apache:devfrom
ruanwenjun:dao/datasource-and-datasource-user

Conversation

@ruanwenjun
Copy link
Copy Markdown
Member

Was this PR generated or assisted by AI?

YES, gpt 5.5

Purpose of the pull request

Introduce DataSourceDao and DataSourceUserDao so the api layer depends only on the repository abstraction. The two mappers are bundled because DataSourceServiceImpl and UsersServiceImpl share both.

DataSourceDao renames mapper.selectPaging / selectPagingByIds to queryDataSourcePaging / queryDataSourcePagingByIds and folds the selectByMap("user_id", X) idiom from DataSourceServiceImpl into queryByUserId(int) so the QueryWrapper-style call no longer leaks into the api layer.

DataSourceUserDao exposes deleteByUserId / deleteByDatasourceId as void (the mapper-returned row count was never consulted at the call sites).

Tracking issue: #18249

Brief change log

Verify this pull request

This pull request is code cleanup without any test coverage.

(or)

This pull request is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(or)

Pull Request Notice

Pull Request Notice

If your pull request contains incompatible change, you should also add it to docs/docs/en/guide/upgrade/incompatible.md

@ruanwenjun ruanwenjun added this to the 3.4.2 milestone May 13, 2026
@ruanwenjun ruanwenjun added the improvement make more easy to user or prompt friendly label May 14, 2026
@ruanwenjun ruanwenjun force-pushed the dao/datasource-and-datasource-user branch 4 times, most recently from 2539b33 to 98abe20 Compare May 17, 2026 01:55
…per access through repository Dao

Introduce DataSourceDao and DataSourceUserDao so the api layer depends
only on the repository abstraction. The two mappers are bundled because
DataSourceServiceImpl and UsersServiceImpl share both.

DataSourceDao renames mapper.selectPaging / selectPagingByIds to
queryDataSourcePaging / queryDataSourcePagingByIds and folds the
selectByMap("user_id", X) idiom from DataSourceServiceImpl into
queryByUserId(int) so the QueryWrapper-style call no longer leaks
into the api layer.

DataSourceUserDao exposes deleteByUserId / deleteByDatasourceId as void
(the mapper-returned row count was never consulted at the call sites).

Tracking issue: apache#18249
@ruanwenjun ruanwenjun force-pushed the dao/datasource-and-datasource-user branch from 98abe20 to f471ed4 Compare May 18, 2026 09:58
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 60%)

See analysis details on SonarQube Cloud

Copy link
Copy Markdown
Member

@SbloodyS SbloodyS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SbloodyS SbloodyS merged commit 6af38d0 into apache:dev May 18, 2026
121 of 123 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend improvement make more easy to user or prompt friendly refactor test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants