agentsclimarketplace

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.

Install
npx -y skills add kjuhwa/skills-hub --skill version-specific-sql-map-selection

Assembled 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>.xml in a single resources folder.
  • Registry: boot-time scan loads every matching file into Map<(dbms,version), Map<queryId, sql>>.
  • Lookup: getQuery(dbms, rawVersion, queryId) runs rawVersion through 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

  1. Define a DbmsVersionResolver interface: String resolve(String rawVersion); one impl per DBMS.
  2. In each impl, map raw version strings to the nearest supported bucket (e.g. 10.x, 11.x, 12.x12c; unknown → documented default).
  3. Register impls in a Map<Dbms, DbmsVersionResolver>.
  4. At startup, glob sql_map_*.xml and parse (dbms, version) from the filename; store in a two-level map.
  5. 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.
  6. 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.

Keep looking

Skills are one crate of 327,069. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.