Made dev tools not break everything about the db

Also improved multi statements to allow out of order parameter binding in statements
Ensured that all statements are run for maybe_row and single, and that of all statements only 1 of them returns only 1 row
Made bind and column calls add useful context to errors

Co-authored-by: kay@zed.dev
This commit is contained in:
Mikayla Maki 2022-11-21 13:42:26 -08:00
parent 2dc1130902
commit 3e0f9d27a7
13 changed files with 219 additions and 110 deletions

View file

@ -633,11 +633,11 @@ impl Workspace {
active_call = Some((call, subscriptions));
}
let id = if let Some(id) = serialized_workspace.as_ref().map(|ws| ws.id) {
id
} else {
DB.next_id().log_err().flatten().unwrap_or(0)
};
let database_id = serialized_workspace
.as_ref()
.map(|ws| ws.id)
.or_else(|| DB.next_id().log_err())
.unwrap_or(0);
let mut this = Workspace {
modal: None,
@ -666,7 +666,7 @@ impl Workspace {
last_leaders_by_pane: Default::default(),
window_edited: false,
active_call,
database_id: id,
database_id,
_observe_current_user,
};
this.project_remote_id_changed(project.read(cx).remote_id(), cx);