pub enum Input {
Query {
id: String,
session: Option<String>,
sql: String,
params: Vec<Value>,
options: QueryOptions,
},
Config(ConfigPatch),
Cancel {
id: String,
},
Ping,
Close,
SessionInfo {
id: Option<String>,
session: Option<String>,
},
Begin {
id: Option<String>,
session: Option<String>,
read_only: bool,
permission: Option<Permission>,
},
Commit {
id: Option<String>,
session: Option<String>,
},
Rollback {
id: Option<String>,
session: Option<String>,
},
}Variants§
Query
Config(ConfigPatch)
Cancel
Ping
Close
SessionInfo
Begin
Open an explicit transaction on the named session. Subsequent
query requests on that session run on the open transaction
(no implicit BEGIN..COMMIT wrap) until commit or rollback.
Fields
§
read_only: boolWhen true, send BEGIN READ ONLY. Default is read-write so the
caller can run writes; per-query permission still gates the SQL.
§
permission: Option<Permission>Pass --permission write (or matching ssh-write/container-write)
to allow BEGIN on a session that defaults to read-only. Without
it, an implicit-read session rejects the begin.
Commit
Rollback
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Input
impl<'de> Deserialize<'de> for Input
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Input
impl RefUnwindSafe for Input
impl Send for Input
impl Sync for Input
impl Unpin for Input
impl UnsafeUnpin for Input
impl UnwindSafe for Input
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more