feat(catalogschema): add shared SQL Server catalog/schema helpers#646
Open
actiontech-bot wants to merge 1 commit into
Open
feat(catalogschema): add shared SQL Server catalog/schema helpers#646actiontech-bot wants to merge 1 commit into
actiontech-bot wants to merge 1 commit into
Conversation
Extract SQL Server merged-layer catalog/schema name helpers into a shared package under pkg/dms-common so dms-ee structure/masking and provision account provisioning reuse one implementation instead of maintaining divergent copies across two Go modules. Ref: actiontech/dms-ee#918
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
SQL Server 采用 database.schema 两级结构,DMS 在选库入口将其合并为单层名称(整库
db或db.schema)呈现。该「合并层」名称的解析/拼接/过滤逻辑此前在 dms-ee(结构采集、脱敏)与 provision(建账户授权)两个独立 Go module 中各自维护一份,存在行为漂移风险。变更
新增公共包
pkg/dms-common/pkg/catalogschema,统一维护合并层 catalog/schema 名称语义:IsSchemaLevelDBType/BuildFullCatalogSchemaName/SplitCatalogSchema/SchemaNameMatchesFilter/ConnectionCatalogForMergedNameSplitCatalogSchema以LastIndex拆分,兼容数据库名本身含.的情形(假定 schema 段不含.)后续 dms-ee 与 provision 将改用本公共包替换各自副本。
关联 actiontech/dms-ee#918