Skip to content

Commit 5e9ef85

Browse files
committed
fix
1 parent 74f9e2f commit 5e9ef85

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ts_generator/errors.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ pub enum TsGeneratorError {
4242
},
4343
#[error("[E017] Failed to process INSERT statement: {reason}. Query: `{query}`")]
4444
InsertStatementProcessingFailed { reason: String, query: String },
45+
#[error("[E018] Failed to process UPDATE statement: {reason}. Query: `{query}`")]
46+
UpdateStatementProcessingFailed { reason: String, query: String },
4547
#[error("[E018] Table '{table}' not found in database schema. Check that the table exists and is accessible.")]
4648
TableNotFoundInSchema { table: String },
4749
#[error("[E019] Failed to infer table name while processing WHERE clause. Query: `{query}`")]

src/ts_generator/sql_parser/expressions/translate_expr.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -755,7 +755,7 @@ pub async fn translate_assignment(
755755
})?;
756756

757757
let column_name = translate_column_name_assignment(assignment).ok_or_else(|| {
758-
TsGeneratorError::InsertStatementProcessingFailed {
758+
TsGeneratorError::UpdateStatementProcessingFailed {
759759
reason: "Failed to extract column name from assignment".to_string(),
760760
query: format!("UPDATE {} SET {} = ...", table_name, assignment),
761761
}

0 commit comments

Comments
 (0)