Expand description
Convert command for translating SQL dumps between dialects.
Supports conversion between MySQL, PostgreSQL, and SQLite dialects with:
- Identifier quoting conversion (backticks ↔ double quotes)
- String escape normalization (' ↔ ‘’)
- Data type mapping (AUTO_INCREMENT ↔ SERIAL ↔ INTEGER PRIMARY KEY)
- COPY FROM stdin → INSERT conversion
- Session header conversion
- Warning system for unsupported features
Structs§
- Convert
Config - Configuration for the convert command
- Convert
Stats - Statistics from convert operation
- Converter
- Main converter that dispatches to specific dialect converters
- Copy
Header - Result of parsing a COPY header
- Type
Mapper - Type mapper for converting between dialects
- Warning
Collector - Collects warnings during conversion
Enums§
- Convert
Warning - Warning types that can occur during conversion
- Copy
Value - A parsed value from COPY data
Functions§
- copy_
to_ inserts - Convert a COPY data block to INSERT statements
- parse_
copy_ data - Parse COPY data block into rows of values
- parse_
copy_ header - Parse a COPY header to extract table and columns Input: “COPY schema.table (col1, col2) FROM stdin;”
- run
- Run the convert command