Polyglot SQL Dialect Transpiler (PostgreSQL, MySQL, SQLite)
transpile_sql_dialectConvert SQL queries and DDL schemas between PostgreSQL, MySQL, and SQLite dialects, rewriting functions and syntax quirks for backend migrations or in-memory SQLite testing.
Instructions
Transpiles SQL queries and DDL schemas across PostgreSQL, MySQL, and SQLite dialects, rewriting functions and syntax quirks. Use when migrating application queries across database backends or testing against in-memory SQLite; for generating new queries from natural language, use synthesize_sql_query instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'sql_code' and 'source_dialect' ('target_dialect' defaults to 'sqlite'), supports '?demo=true' or L402 (10 sats), and returns HTTP 400 if invalid.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql_code | Yes | SQL query or DDL statement to convert from source dialect into target dialect. | |
| source_dialect | Yes | Original SQL dialect of the input code: postgresql, mysql, or sqlite. | |
| target_dialect | Yes | Destination SQL dialect to transpile into: postgresql, mysql, or sqlite. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| transpiled_sql | Yes | Transpiled SQL code compliant with the target database dialect specification. | |
| compatibility_warnings | Yes | Potential semantic differences or unsupported features flagged during transpilation. | |
| syntax_transformations | Yes | List of dialect-specific transformations applied (e.g., NOW() to CURRENT_TIMESTAMP). |