Motivation & Problem
In lib/core/database/table_mutation_engine.dart, there is no handling for binary data types (bytea, blob, binary, varbinary, bit, raw). When a user edits a binary cell in the Data Grid with a hex string (e.g. \xDEADBEEF, 0xDEADBEEF, DEADBEEF), the mutation engine formats it as a standard string literal '\xDEADBEEF', which causes syntax errors in MySQL (BLOB) and SQLite (BLOB) or typing mismatch in PostgreSQL.
Additionally, GridDataTypeValidator lacks validation for binary / hex formats.
Proposed Solution
- In TableMutationEngine:
- Add _isBinaryType(dataTypeName).
- Format binary values according to SQL dialect:
- PostgreSQL: E'\\x...' or '\\x...'::bytea
- MySQL: X'...'
- SQLite: X'...'
- In GridDataTypeValidator:
- Add validation for blob, binary, varbinary, and bytea checking for valid hexadecimal representations.
- Add unit tests for binary formatting and validation across dialects.
Acceptance Criteria
- Hexadecimal cell edits on binary columns produce valid SQL literals across PostgreSQL, MySQL, and SQLite.
- GridDataTypeValidator validates hex strings for binary types and rejects malformed non-hex input.
- Unit tests pass.
Reactions are currently unavailable
Motivation & Problem
In lib/core/database/table_mutation_engine.dart, there is no handling for binary data types (bytea, blob, binary, varbinary, bit, raw). When a user edits a binary cell in the Data Grid with a hex string (e.g. \xDEADBEEF, 0xDEADBEEF, DEADBEEF), the mutation engine formats it as a standard string literal '\xDEADBEEF', which causes syntax errors in MySQL (BLOB) and SQLite (BLOB) or typing mismatch in PostgreSQL.
Additionally, GridDataTypeValidator lacks validation for binary / hex formats.
Proposed Solution
Acceptance Criteria