Lines Matching refs:attributes
114 fn get_db_name(attributes: &ExtDbMap, is_ce: bool) -> std::result::Result<String, u32> {
115 let owner = attributes.get_bytes_attr(&column::OWNER).map_err(|e| e.code as u32)?;
116 let owner_type = attributes.get_enum_attr::<OwnerType>(&column::OWNER_TYPE).map_err(|e| e.code as u32)?;
131 fn add(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> {
132 let db_name = get_db_name(attributes, false)?;
134 db.insert_datas(attributes).map_err(|e| e.code as u32)
138 fn ce_add(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> {
139 let db_name = get_db_name(attributes, true)?;
141 db.insert_datas(attributes).map_err(|e| e.code as u32)
145 fn replace(&mut self, condition: &ExtDbMap, attributes: &ExtDbMap) -> std::result::Result<(), u32> {
146 let db_name = get_db_name(attributes, false)?;
148 db.replace_datas(condition, false, attributes).map_err(|e| e.code as u32)
152 fn ce_replace(&mut self, condition: &ExtDbMap, attributes: &ExtDbMap) -> std::result::Result<(), u32> {
153 let db_name = get_db_name(attributes, true)?;
155 db.replace_datas(condition, false, attributes).map_err(|e| e.code as u32)
159 fn query(&mut self, attributes: &ExtDbMap) -> std::result::Result<Vec<ExtDbMap>, u32> {
164 query_data.extend(db.query_datas(&vec![], attributes, None, false).map_err(|e| e.code as u32)?);
170 fn ce_query(&mut self, attributes: &ExtDbMap) -> std::result::Result<Vec<ExtDbMap>, u32> {
175 query_data.extend(db.query_datas(&vec![], attributes, None, false).map_err(|e| e.code as u32)?);
181 fn remove(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> {
186 total_remove_count += db.delete_datas(attributes, None, false).map_err(|e| e.code as u32)?;
192 fn ce_remove(&mut self, attributes: &ExtDbMap) -> std::result::Result<i32, u32> {
197 total_remove_count += db.delete_datas(attributes, None, false).map_err(|e| e.code as u32)?;
234 /// Updates the attributes of an asset in de db.
235 fn update(&mut self, attributes: &ExtDbMap, attrs_to_update: &ExtDbMap) -> std::result::Result<i32, u32> {
240 total_update_count += db.update_datas(attributes, false, attrs_to_update).map_err(|e| e.code as u32)?;
245 /// Updates the attributes of an asset in ce db.
246 fn ce_update(&mut self, attributes: &ExtDbMap, attrs_to_update: &ExtDbMap) -> std::result::Result<i32, u32> {
251 total_update_count += db.update_datas(attributes, false, attrs_to_update).map_err(|e| e.code as u32)?;