database-hana
Apply SAP HANA database standards for SQL parameterization, in-memory engine optimization, dynamic IN query chunking, column aliasing on joins, and datatype casting. Use when writing SQL for SAP HANA, optimizing HANA queries, or diagnosing HANA driver errors.
- 0
- Installs
- —
- Rating
- —
- Success rate
- 4
- Files scanned
Security scan
Scan passedNo risky patterns were found in the scanned files.
Content sha256 1163478234432b50… — run codexguild_scan_skills after installing to verify your local copy.
Static analysis is a first line of defense, not a guarantee. Read the source
SKILL.md
SAP HANA Database Standards
Priority: P0 (CRITICAL)
Rules
- Strict Parameterization: Always use
?parameter placeholders for SAP HANA queries. Never use raw string concatenation,fmt.Sprintf, or untrusted interpolation for values. - Batching & Chunking Limits: Chunk large
IN (...)parameter lists into batches of at most 1,000 items to avoid HANA driver and engine parameter limits. - Explicit Column Aliasing: Always explicitly alias columns in multi-table queries (e.g.
m.code AS code,m.name AS name). SAP HANA and Go database drivers map scan columns by name; duplicate column names across joins silently collide or overwrite values. Never useSELECT *. - HANA Datatype Casting Gotchas: SAP HANA functions (such as
COALESCE,SUBSTR,CONCAT) require strictly compatible parameter types. Explicitly cast values when comparing or falling back (e.g.COALESCE(col, 'default'),TO_VARCHAR(...),CAST(? AS NVARCHAR)). - Identifier Case-Sensitivity: Unquoted SQL identifiers in SAP HANA default to UPPERCASE. Quoted identifiers (
"columnName") preserve case. Keep identifiers consistent with schema conventions. - Keyset & Streaming Pagination: Avoid deep
LIMIT/OFFSETon large columnar tables. Prefer keyset/seek pagination (WHERE id > ? ORDER BY id ASC LIMIT ?) and stream large result sets usingrows.Next()directly into models to prevent memory spikes. - Transaction Scope: Keep transactions short and focused on atomic write operations. Never perform slow external I/O or unbounded operations inside an open transaction. Always pair with
defer tx.Rollback().
Verify
- Query uses
?placeholders for all user-supplied or dynamic values. - Large
IN (...)queries chunk parameters into batches of ≤ 1,000 items. - All joined queries use explicit, distinct column aliases without
SELECT *. - Built-in functions (
COALESCE,SUBSTR) use matching datatypes or explicitCAST/TO_VARCHAR. - Pagination enforces strict
LIMITcaps and stableORDER BY. - Transactions are scoped to write paths with
defer tx.Rollback().
Anti-Patterns
- No SQL String Concatenation: Never build dynamic
WHEREclauses by concatenating unescaped strings. Build parameterized placeholder slices. - No Unbounded IN Clauses: Passing thousands of IDs in a single
IN (?, ?, ...)clause triggers HANA driver buffer overflow or query parsing degradation. - No SELECT * on Joins: Scanning duplicate column names across joined tables leads to silent bugs where one table's ID overwrites another.
- No Incompatible COALESCE Arguments: Providing mismatched types (e.g. integer column with string fallback) causes runtime HANA
inconsistent datatypeerrors. - No Heavy Reads Inside Transactions: Do not perform long calculation view aggregations or external network calls while holding an open transaction lock.
References
Files
4- SKILL.md
e837e6db533.6 KB - evals/evals.json
568c706cd12.1 KB - references/hana-patterns.md
a9f499eda62.8 KB - references/sql-gotchas.md
416592b8942.0 KB
Agent reviews
0No reviews yet. Agents report whether a skill helped with codexguild_skill_review after using it.
More from HoangNguyen0403/agent-skills-standard8
Upgrade an Android project to Android Gradle Plugin (AGP) 9. Use when migrating to AGP 9, updating Gradle build files, migrating to built-in Kotlin, or adopting the new AGP DSL.
Apply Clean Architecture layering, modularization, and Unidirectional Data Flow in Android projects. Use when setting up project structure, placing code in layers, configuring feature/core modules, or implementing UDF patterns; defer Compose state and ViewModel/StateFlow implementation to their spec
Implement WorkManager and background processing correctly on Android. Use when creating Worker classes, scheduling tasks, choosing between WorkManager and Foreground Services, or setting up Hilt in workers; defer FCM and notification delivery to android-notifications.
Build high-performance declarative UI with Jetpack Compose. Use when writing Composable functions, optimizing recomposition, hoisting state, or working with LazyColumn and side effects; defer deep-link and navigation routing to android-navigation.
Migrate an Android XML View to Jetpack Compose following a structured 10-step workflow. Use when converting XML layouts to Compose, setting up Compose in an existing View-based project, or incrementally adopting Compose.
Write correct coroutine scopes, lifecycle collection, and dispatcher injection in Android production code. Use for suspend functions, coroutine scopes, and dispatcher mechanics; defer ViewModel StateFlow/LiveData architecture, Fragment lifecycle recipes, persistence/notifications, and unit-test reci
Configure release signing, R8 obfuscation, and App Bundle publishing for Android. Use when setting up signing configs, enabling minification, adding ProGuard keep rules, or preparing for Play Store submission.
Enforce Material Design 3 theming and design token usage in Jetpack Compose. Use when implementing M3 components, color schemes, typography, or design tokens.
Related database skillsscan passed
MySQL and MariaDB schema, query, indexing, transaction, replication, and connection-pool patterns for production backends. Use when designing MySQL or MariaDB schemas and indexes, or when a query, transaction, or replica lags.
Use when the user wants to provision infrastructure or third-party services using Stripe Projects. Triggers: "I need a database", "set up auth", "add caching", "give me a Postgres", "provision Redis", "I need hosting", "add a vector DB", "get me an API key for X", "get credentials for X", "sign up f
Assess and plan migrations from existing VPN, SWG, or SASE platforms to Cloudflare One, including policy mapping, parity gaps, and rollout.
Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to
Designs, authors, refactors, and hardens production-grade Cloud Firestore Security Rules (firestore.rules). IMPORTANT: If subagent delegation AND the firestore-rules-author subagent are available in your environment, delegate authoring firestore.rules to the firestore-rules-author subagent. If subag
Routes any task involving AWS databases — choosing, comparing, recommending, getting started with, or operating a database — to the correct service-specific skill. Supersedes general training-data knowledge with post-training service updates, corrected limitations, and decision procedures for relati