pub struct Rename {
pub passwd: String,
pub old_name: String,
pub new_name: String,
}
Expand description
Rename a database
On the Odoo side, this is handled by issuing an SQL query like:
ALTER DATABSE {old_name} RENAME TO {new_name};
It should be a fairly quick request, but note that the above ALTER DATABASE
statement
may fail for various reasons. See the Postgres documentation for info.
§Example
let resp = client.db_rename(
"master-password",
"old-database-name",
"new-database-name",
).send()?;
Reference: odoo/service/db.py
Fields§
§passwd: String
The Odoo master password
old_name: String
The database name
new_name: String
The new database name
Trait Implementations§
Source§impl JsonRpcParams for Rename
impl JsonRpcParams for Rename
type Container<T> = OdooApiContainer<Rename>
type Response = RenameResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooApiMethod for Rename
impl OdooApiMethod for Rename
Source§fn describe(&self) -> (&'static str, &'static str)
fn describe(&self) -> (&'static str, &'static str)
Describe the JSON-RPC service and method for this type
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe method endpoint (e.g., “/web/session/authenticate”)
Source§fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
fn _build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Build
self
into a full JsonRpcRequest
Auto Trait Implementations§
impl Freeze for Rename
impl RefUnwindSafe for Rename
impl Send for Rename
impl Sync for Rename
impl Unpin for Rename
impl UnwindSafe for Rename
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