Skip to content

Commit

Permalink
one more ifdef for libsql
Browse files Browse the repository at this point in the history
  • Loading branch information
tantaman committed Nov 10, 2023
1 parent 7cacc5e commit 8888ed6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/rs/core/src/changes_vtab_write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ fn did_cid_win(
let ret = crsql_compare_sqlite_values(insert_val, local_value);
reset_cached_stmt(col_val_stmt.stmt)?;
// insert site id won and values differ. We should take the update.
// if values are the same (ret == 0) then we return false and do not take the update
return Ok(ret != 0);
}
_ => {
Expand All @@ -121,8 +122,6 @@ fn did_cid_win(
return Err(ResultCode::ERROR);
}
}

return Ok(ret > 0);
}

fn set_winner_clock(
Expand Down
8 changes: 6 additions & 2 deletions core/src/changes-vtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -176,5 +176,9 @@ sqlite3_module crsql_changesModule = {
/* xSavepoint */ 0,
/* xRelease */ 0,
/* xRollbackTo */ 0,
/* xShadowName */ 0,
/* xPreparedSql */ 0};
/* xShadowName */ 0
#ifdef LIBSQL
,
/* xPreparedSql */ 0
#endif
};

0 comments on commit 8888ed6

Please sign in to comment.