Workspace persistence for SSH projects (#17996)
TODOs: - [x] Add tests to `workspace/src/persistence.rs` - [x] Add a icon for ssh projects - [x] Fix all `TODO` comments - [x] Use `port` if it's passed in the ssh connection options In next PRs: - Make sure unsaved buffers are persisted/restored, along with other items/layout - Handle multiple paths/worktrees correctly Release Notes: - N/A --------- Co-authored-by: Bennet Bo Fenner <bennet@zed.dev>
This commit is contained in:
parent
7d0a7541bf
commit
e9f2e72ff0
12 changed files with 592 additions and 141 deletions
|
@ -196,6 +196,22 @@ impl Column for u32 {
|
|||
}
|
||||
}
|
||||
|
||||
impl StaticColumnCount for u16 {}
|
||||
impl Bind for u16 {
|
||||
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
|
||||
(*self as i64)
|
||||
.bind(statement, start_index)
|
||||
.with_context(|| format!("Failed to bind usize at index {start_index}"))
|
||||
}
|
||||
}
|
||||
|
||||
impl Column for u16 {
|
||||
fn column(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> {
|
||||
let result = statement.column_int64(start_index)?;
|
||||
Ok((result as u16, start_index + 1))
|
||||
}
|
||||
}
|
||||
|
||||
impl StaticColumnCount for usize {}
|
||||
impl Bind for usize {
|
||||
fn bind(&self, statement: &Statement, start_index: i32) -> Result<i32> {
|
||||
|
|
|
@ -74,7 +74,7 @@ impl Connection {
|
|||
}
|
||||
|
||||
/// Prepare a statement which takes a binding and selects a single row
|
||||
/// from the database. WIll return none if no rows are returned and will
|
||||
/// from the database. Will return none if no rows are returned and will
|
||||
/// error if more than 1 row is returned.
|
||||
///
|
||||
/// Note: If there are multiple statements that depend upon each other
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue