Skip to content

Commit

Permalink
store the ID of the inserted record in the UI DB in the data log
Browse files Browse the repository at this point in the history
  • Loading branch information
yazz committed Jan 29, 2025
1 parent 83e09fd commit a5cd113
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions public/go.html
Original file line number Diff line number Diff line change
Expand Up @@ -13956,6 +13956,7 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
fields: [
{name: "id", fieldType: "INTEGER"},
{name: "fk_parent_debug_sql_log_id", fieldType: "INTEGER"},
{name: "fk_record_id", fieldType: "INTEGER"},
{name: "table_name", fieldType: "STRING"},
{name: "operation_type", fieldType: "STRING"},
{name: "new_value", fieldType: "STRING"}
Expand Down Expand Up @@ -14261,8 +14262,8 @@ <h1 style='width:100%;vertical-align:top;display:inline-block;font-size:100px; t
].indexOf(tableName) == -1) {
if (yz.debug.currentSqlLogId) {
//yz.debug.currentSqlLogId = yz.uiDb.sqlui1("select max(id) as id from ui_table_debug_sql_log").id
yz.uiDb.sqlui( "insert into ui_table_debug_data_log ( id , table_name , new_value , operation_type , fk_parent_debug_sql_log_id ) values (?,?,?,?,?)",
[yz.uiDb.uiDbNextId ++,tableName, JSON.stringify(r),"INSERT",yz.debug.currentSqlLogId])
yz.uiDb.sqlui( "insert into ui_table_debug_data_log ( id , table_name , fk_record_id , new_value , operation_type , fk_parent_debug_sql_log_id ) values (?,?,?,?,?,?)",
[yz.uiDb.uiDbNextId ++,tableName, r.id , JSON.stringify(r),"INSERT",yz.debug.currentSqlLogId])
}
}

Expand Down

0 comments on commit a5cd113

Please sign in to comment.