3
59

Huawei Developer Competition 2024 Northern Africa

zhangtingzhu

Moderator
Asked Oct 09, 2024 at 04:49
853
Unanswered
Latest edited Oct 09, 2024 at 11:02

If you want to know more about the competition , please click the link to Join in .

Huawei Developer Competition, our flagship event for global ICT developers, opens up Huawei's technological achievements for developers to find new solutions to real-world problems.

59 replies
Active
hid_6iaez8g0-554zf9
#2 | Replied Dec 07, 2024 at 04:52

To use the get_list service with an ignore case condition, you typically need to normalize the case of the values being compared. Here’s a general approach:

  1. Lowercase both sides: Convert both the input and the list elements to lowercase before comparison.
  2. Custom filtering: Apply a filter or query logic that explicitly handles case insensitivity.

If you're working with a specific API or library, it might look something like this (e.g., Python with a get_list function):



# Assuming get_list takes a filtering function filtered_list = get_list(lambda item: item['field'].lower() == search_value.lower())

In SQL-like queries, use case-insensitive operators, such as ILIKE in PostgreSQL:



SELECT * FROM table WHERE LOWER(field) = LOWER('value');

If get_list has built-in options for case-insensitivity, consult the documentation or look for parameters like ignore_case=True.

Comment0
darrenqinglin
#1 | Replied Sep 26, 2024 at 11:15
It is recommend to use the translator in the service. The translator can create JS script to convert the input before it is send to process in the TQL Query.cke_2081.pngcke_1814.png
Comment0
zhangtingzhu
Moderator
Answers
1
Questions
3
Top questions

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more