searchConditionのoperatorについて
使用できるoperatorは、検索条件の対象とする項目のアイテムタイプにより異なります。
No. | アイテムタイプ | 使用できるoperator | サンプル |
---|---|---|---|
1 | ADDRESS(住所) | ・@> ・not @> ・<@ ・not <@ | { "column": "customers.customer.address", "operator": "@>", "value": { "street": "test street", "country": "JPN" } } |
2 | DATE(日付) | ・< ・<= ・= ・!= ・>= ・> ・is ・is not | { "column": "tasks.task.expected_completion_date", "operator": ">=", "value": "2025/01/01" } |
3 | DATETIME(日時) | ・< ・<= ・= ・!= ・>= ・> ・is ・is not | { "column": "activities.activity.visit_start_datetime", "operator": "<", "value": "2025/01/01 00:00:00" } |
4 | EMAIL(メールアドレス) | ・like ・not like ・= ・!= ・in ・not in ・is ・is not | { "column": "employees.employee.email", "operator": "like", "value": "%@gmail.com" } |
5 | FILE(ファイル) | ・like ・not like ・= ・!= ・in ・not in ・is ・is not | { "column": "business_cards.business_card.businesscard_image", "operator": "like", "value": "497-result.json" } |
6 | MEMO(テキスト(複数行)) | ・like ・not like ・= ・!= ・in ・not in ・is ・is not | { "column": "businessplans.businessplan.businessplan_memo", "operator": "=", "value": "メモ" } |
7 | NUMBER(数値) | ・< ・<= ・= ・!= ・>= ・> ・in ・not in ・is ・is not | { "column": "products.product.unit_price", "operator": "<=", "value": 9999 } |
8 | SB_RELATION(紐づけ項目) | 紐づき先の項目で検索する | 紐づき先の項目で検索する |
9 | SELECT(複数(チェックボックス、プルダウン、ラジオボタン)) | ・@> ・not @> ・<@ ・not <@ ・in @> ・&& ・not && ・is ・is not | { "column": "deals.deal.continue_or_terminate_flg", "operator": "<@", "value": ["継続"] } |
10 | SELECT(単数(チェックボックス、プルダウン、ラジオボタン) | ・= ・!= ・in ・not in ・is ・is not | { "column": "customers.customer.customer_type", "operator": "=", "value": "法人" } |
11 | STRING(テキスト) | ・like ・not like ・= ・!= ・in ・not in ・is ・is not | { "column": "businessplans.businessplan.businessplan_name", "operator": "=", "value": "テスト案件" } |
12 | TELNO(電話番号) | ・= ・!= ・in ・not in ・like ・not like ・> ・>= ・< ・<= ・is ・is not | { "column": "customers.customer.tel_no", "operator": "=", "value": "01-2345-6789" } |
13 | TIME(時間) | ・< ・<= ・= ・!= ・>= ・> ・is ・is not | { "column": "deals.deal.type_time", "operator": "<", "value": 00:00:00" } |
14 | URL(リンク) | ・like ・not like ・= ・!= ・in ・not in ・is ・is not | { "column": "business_cards.business_card.url", "operator": "like", "value": "%gmail.com" } |
15 | ID | ・< ・<= ・= ・!= ・>= ・> ・in ・not in ・is ・is not | { "column": "employees.department.id", "operator": "=", "value": 14852199177304 } |
operatorの説明
No. | operator | 名前 | 説明 |
---|---|---|---|
Equals | 等しい | ||
NotEquals | 等しくない | ||
LessThan | より小さい | ||
LessThanOrEquals | 以下 | ||
GreaterThan | より大きい | ||
GreaterThanOrEquals | 以上 | ||
Equals | 等しい※is nullの形でnullとの比較のみ使用 | ||
NotEquals | 等しくない※is not nullの形でnullとの比較のみ使用 | ||
Like | 含む 文字列にのみ使用。 ワイルドカード(%)は、0文字以上の文字列に一致。 | ||
NotLike | 含まない 文字列にのみ使用。 ワイルドカード(%)は、0文字以上の文字列に一致。 | ||
In | 指定したリストのいずれかが等しい | ||
NotIn | 指定したリストのいずれも等しくない | ||
And | 指定したリストのいずれも等しい | ||
NotAnd | 指定したリストのいずれも等しくない | ||
Contains | 含む | ||
NotContains | 含まない | ||
Contained | 含まれる | ||
NotContained | 含まれない |