mark todo list

Change-Id: If6a83d8cd7500c53d65fe32400adbca817114d36

Match-id-87c59334a43fe6cb20a942ed265ee9bffda6ba38
This commit is contained in:
authName 2023-10-14 17:01:15 +08:00 committed by userName
parent 17deebf18b
commit 4a2be6d170

View File

@ -42,6 +42,7 @@ fn convert_value_into_db_value(value: &Value) -> Result<DataValue> {
}
}
// todo zwz 尝试与下文映射归一
fn get_tag_column_name(tag: &Tag) -> Option<&'static str> {
match *tag {
Tag::Accessibility => Some(G_COLUMN_ACCESSIBILITY),
@ -62,6 +63,24 @@ fn get_tag_column_name(tag: &Tag) -> Option<&'static str> {
}
}
// todo zwz 尝试与上文映射归一
fn order_by_into_str(order_by: &u32) -> Result<&'static str> {
match Tag::try_from(*order_by)? {
Tag::DataLabelNormal1 => Ok(G_COLUMN_NORMAL1),
Tag::DataLabelNormal2 => Ok(G_COLUMN_NORMAL2),
Tag::DataLabelNormal3 => Ok(G_COLUMN_NORMAL3),
Tag::DataLabelNormal4 => Ok(G_COLUMN_NORMAL4),
Tag::DataLabelCritical1 => Ok(G_COLUMN_CRITICAL1),
Tag::DataLabelCritical2 => Ok(G_COLUMN_CRITICAL2),
Tag::DataLabelCritical3 => Ok(G_COLUMN_CRITICAL3),
Tag::DataLabelCritical4 => Ok(G_COLUMN_CRITICAL4),
_ => {
loge!("Invalid tag for order by [{}].", order_by);
Err(ErrCode::InvalidArgument)
}
}
}
pub(crate) fn set_input_attr(input: &AssetMap, vec: &mut Vec<Pair<>>) -> Result<()> {
for (tag, value) in input.iter() {
// skip secret param input, for it should be cipher instead of plain
@ -125,23 +144,6 @@ pub(crate) fn data_exist_once(calling_info: &CallingInfo, db_data: &Vec<Pair>) -
DefaultDatabaseHelper::is_data_exists_default_once(calling_info.user_id(), db_data)
}
fn order_by_into_str(order_by: &u32) -> Result<&'static str> {
match Tag::try_from(*order_by)? {
Tag::DataLabelNormal1 => Ok(G_COLUMN_NORMAL1),
Tag::DataLabelNormal2 => Ok(G_COLUMN_NORMAL2),
Tag::DataLabelNormal3 => Ok(G_COLUMN_NORMAL3),
Tag::DataLabelNormal4 => Ok(G_COLUMN_NORMAL4),
Tag::DataLabelCritical1 => Ok(G_COLUMN_CRITICAL1),
Tag::DataLabelCritical2 => Ok(G_COLUMN_CRITICAL2),
Tag::DataLabelCritical3 => Ok(G_COLUMN_CRITICAL3),
Tag::DataLabelCritical4 => Ok(G_COLUMN_CRITICAL4),
_ => {
loge!("Invalid tag for order by [{}].", order_by);
Err(ErrCode::InvalidArgument)
}
}
}
fn get_query_options(input: &AssetMap) -> QueryOptions {
QueryOptions {
offset: match input.get(&Tag::ReturnOffset) {