pub struct Exists {
pub database: String,
pub uid: OdooId,
pub password: String,
pub model: String,
pub ids: OdooIds,
}
Expand description
Check if the record(s) exist in the Odoo database
Note: This method works by accepting a list of ids, and returning only
the ids that actually exist. See ExistsResponse
for more info.
§Example
client.exists(
"res.partner",
vec![1, 2, -1, 999999999]
).send()?;
// The response would be [1, 2], assuming that -1 and 999999999 do not exist
See: odoo/models.py
Fields§
§database: String
The database name (auto-filled by OdooClient
)
uid: OdooId
The user id (auto-filled by OdooClient
)
password: String
The user password (auto-filled by OdooClient
)
model: String
The Odoo model
ids: OdooIds
The ids to check
Trait Implementations§
Source§impl JsonRpcParams for Exists
impl JsonRpcParams for Exists
type Container<T> = OdooOrmContainer<Exists>
type Response = ExistsResponse
fn build(self, id: JsonRpcId) -> JsonRpcRequest<Self>
Source§impl OdooOrmMethod for Exists
impl OdooOrmMethod for Exists
Source§fn endpoint(&self) -> &'static str
fn endpoint(&self) -> &'static str
Describe the “ORM” method endpoint (e.g., “/web/session/authenticate”)
Source§fn method(&self) -> &'static str
fn method(&self) -> &'static str
Return the model method name (e.g., “read_group” or “create”)
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 Exists
impl RefUnwindSafe for Exists
impl Send for Exists
impl Sync for Exists
impl Unpin for Exists
impl UnwindSafe for Exists
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