Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Refactor code in handler to keep consistent with stonedb-8.0 #890

Closed
hustjieke opened this issue Nov 7, 2022 · 0 comments
Closed
Assignees
Labels
A-feature feature with good idea C-stonedb-5.7 associated with stonedb 5.7 PR-refactor

Comments

@hustjieke
Copy link
Collaborator

hustjieke commented Nov 7, 2022

Is your feature request related to a problem? Please describe.

To make code more clean and easy to understand, refactor code in handler to keep consistent with stonedb-8.0,

Describe the solution you'd like

  1. NULL-->nullptr
  2. namespace "DBHandler"-->"handler"
  3. class TianmuHandler-->ha_tianmu
  4. sdb-->tianmu
  5. functions in ha_my_tianmu.cpp all renamed with prefix "ha_my_tianmu_xxx"
  6. add new enum 'QueryRouteTo' to replace magic number '0/1'
  7. add new enum 'TableStatus' to replace magic number '0/1/-2'
  8. rename com funcitons like innodb does.
  9. refactor codes to distinguish query and storage engine.
    ...

After refactor, the files in handler will be:

tianmu $ ls handler/
ha_my_tianmu.cpp ha_my_tianmu.h   ha_tianmu.cpp    ha_tianmu.h

Describe alternatives you've considered

Additional context

@hustjieke hustjieke added A-feature feature with good idea C-stonedb-5.7 associated with stonedb 5.7 PR-refactor labels Nov 7, 2022
@hustjieke hustjieke added this to the stonedb_5.7_v1.0.2 milestone Nov 7, 2022
@hustjieke hustjieke self-assigned this Nov 7, 2022
@hustjieke hustjieke changed the title feature: feature: Refactor code in handler to keep consistent with stonedb-8.0 Nov 7, 2022
hustjieke added a commit to hustjieke/stonedb-8.0.30-upgrade that referenced this issue Nov 7, 2022
[summary]
1. NULL-->nullptr
2. namespace "DBHandler"-->"handler"
3. class TianmuHandler-->ha_tianmu
4. sdb-->tianmu
5. functions in ha_my_tianmu.cpp all renamed with prefix "ha_my_tianmu_xxx"
6. add new enum 'QueryRouteTo' to replace magic number '0/1'
7. add new enum 'TableStatus' to replace magic number '0/1/-2'
mergify bot pushed a commit that referenced this issue Nov 7, 2022
[summary]
1. NULL-->nullptr
2. namespace "DBHandler"-->"handler"
3. class TianmuHandler-->ha_tianmu
4. sdb-->tianmu
5. functions in ha_my_tianmu.cpp all renamed with prefix "ha_my_tianmu_xxx"
6. add new enum 'QueryRouteTo' to replace magic number '0/1'
7. add new enum 'TableStatus' to replace magic number '0/1/-2'
davidshiz pushed a commit to davidshiz/stonedb that referenced this issue Nov 8, 2022
[summary]
1. NULL-->nullptr
2. namespace "DBHandler"-->"handler"
3. class TianmuHandler-->ha_tianmu
4. sdb-->tianmu
5. functions in ha_my_tianmu.cpp all renamed with prefix "ha_my_tianmu_xxx"
6. add new enum 'QueryRouteTo' to replace magic number '0/1'
7. add new enum 'TableStatus' to replace magic number '0/1/-2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feature feature with good idea C-stonedb-5.7 associated with stonedb 5.7 PR-refactor
Projects
Development

No branches or pull requests

1 participant