Skip to content

Commit

Permalink
fix: use symbol.for instead of symbol (#232)
Browse files Browse the repository at this point in the history
<!--
Thank you for your pull request. Please review below requirements.
Bug fixes and new features should include tests and possibly benchmarks.
Contributors guide:
https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md

感谢您贡献代码。请确认下列 checklist 的完成情况。
Bug 修复和新功能必须包含测试,必要时请附上性能测试。
Contributors guide:
https://github.com/eggjs/egg/blob/master/CONTRIBUTING.md
-->

##### Checklist
<!-- Remove items that do not apply. For completed items, change [ ] to
[x]. -->

- [ ] `npm test` passes
- [ ] tests and/or benchmarks are included
- [ ] documentation is changed or added
- [ ] commit message follows commit guidelines

##### Affected core subsystem(s)
<!-- Provide affected core subsystem(s). -->


Dal decorator may be installed with multi version.

##### Description of change
<!-- Provide a description of the change below this comment. -->

<!--
- any feature?
- close https://github.com/eggjs/egg/ISSUE_URL
-->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Improvements**
- Enhanced symbol creation for constants, allowing for globally shared
symbols across the application. This change improves consistency and may
boost performance and memory efficiency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
akitaSummer authored Aug 23, 2024
1 parent d3b9efa commit 4254ce5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions core/types/dal/Qualifier.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const DAL_COLUMN_INFO_MAP = Symbol('EggPrototype#dalColumnInfoMap');
export const DAL_COLUMN_TYPE_MAP = Symbol('EggPrototype#dalColumnTypeMap');
export const DAL_INDEX_LIST = Symbol('EggPrototype#dalIndexList');
export const DAL_IS_TABLE = Symbol('EggPrototype#dalIsTable');
export const DAL_TABLE_PARAMS = Symbol('EggPrototype#dalTableParams');
export const DAL_IS_DAO = Symbol('EggPrototype#dalIsDao');
export const DAL_COLUMN_INFO_MAP = Symbol.for('EggPrototype#dalColumnInfoMap');
export const DAL_COLUMN_TYPE_MAP = Symbol.for('EggPrototype#dalColumnTypeMap');
export const DAL_INDEX_LIST = Symbol.for('EggPrototype#dalIndexList');
export const DAL_IS_TABLE = Symbol.for('EggPrototype#dalIsTable');
export const DAL_TABLE_PARAMS = Symbol.for('EggPrototype#dalTableParams');
export const DAL_IS_DAO = Symbol.for('EggPrototype#dalIsDao');

0 comments on commit 4254ce5

Please sign in to comment.