Version specific sql map selection
Skill kjuhwa/skills-hub/skills/backend/version-specific-sql-map-selection
Self-correcting knowledge corpus for Claude Code — 9 stable shape clusters, bias-correction pipeline baked into contribution flow. 47 papers, 45 techniques, 1.1k skills.
npx -y skills add kjuhwa/skills-hub --skill version-specific-sql-map-selectionAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Select MyBatis-style SQL maps at runtime by DBMS + version with graceful fallback to a default supported version
SKILL.md
1.9 KB, 422 tokens by cl100k_base, as published. Nobody here has run it
Version-specific SQL map selection
When monitoring or querying many RDBMS products across many versions (Oracle 9i–23c, MySQL 5.7–9.6, MariaDB 10.6–12.2, PostgreSQL 9.6–18, MSSQL 2012–2022, Tibero 4–6, CUBRID 9.1–11.3), maintain one SQL map XML per (DBMS, majorVersion) tuple and resolve the correct map at runtime.
Shape
- File naming:
sql_map_<DBMS>_<VERSION>.xmlin a single resources folder. - Registry: boot-time scan loads every matching file into
Map<(dbms,version), Map<queryId, sql>>. - Lookup:
getQuery(dbms, rawVersion, queryId)runsrawVersionthrough a per-DBMS version normalizer, then falls back to a known-good default when the normalizer rejects it. - Fallback rationale: unknown target version is better served by the closest supported version than a hard failure — collection keeps running.
Steps
- Define a
DbmsVersionResolverinterface:String resolve(String rawVersion); one impl per DBMS. - In each impl, map raw version strings to the nearest supported bucket (e.g.
10.x, 11.x, 12.x→12c; unknown → documented default). - Register impls in a
Map<Dbms, DbmsVersionResolver>. - At startup, glob
sql_map_*.xmland parse(dbms, version)from the filename; store in a two-level map. - Expose
QueryTextMapper.get(dbms, rawVersion, queryId)that resolves version, looks up, and throws only when the query id is missing for every known version of that DBMS. - Log the resolved
(dbms→version)once per target on first use so operators can see which bucket a target was routed to.
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.