50.3 SEARCHファンクション
このファンクションは、アプリケーション検索を実行します。
構文
APEX_SEARCH.SEARCH (
p_search_static_ids IN apex_t_varchar2,
p_search_expression IN VARCHAR2,
p_apply_order_bys IN VARCHAR2 DEFAULT 'Y',
--
p_return_total_row_count IN VARCHAR2 DEFAULT 'N' )
RETURN apex_search_result_table pipelined;
パラメータ
パラメータ | 説明 |
---|---|
p_search_static_ids |
検索先の検索構成静的IDのリスト。 |
p_search_expression |
検索に使用する条件。 |
p_apply_order_bys |
検索構成内で定義されているソート設定を適用するかどうか。問合せでそれ固有のORDER BY 句が適用される場合は、N を渡します。
|
p_return_total_row_count |
合計行数を戻すかどうか。 |
戻り値
このファンクションでは、apex_search_result_table
オブジェクト・タイプで定義されているとおりに、検索結果の表が戻されます。次の列を使用できます。
CONFIG_LABEL: Label of the search configuration this result comes from.
RESULT_SEQ: Sequence of this result within the search configuration.
次の列の内容は、検索構成内のマッピングに基づいています。
PRIMARY_KEY_1: Primary Key Column 1
PRIMARY_KEY_2: Primary Key Column 2
TITLE: Title
SUBTITLE: Subtitle
DESCRIPTION: Description
BADGE: Value to be shown as result "badge"
LAST_MODIFIED: Timestamp when the result was last modified.
CUSTOM_01: Custom attribute 1
CUSTOM_02: Custom attribute 2
CUSTOM_03: Custom attribute 3
SCORE: Score or Rank value. If Oracle TEXT is used, the TEXT Score is returned.
LINK: Link
RESULT_CSS_CLASSES: Result CSS Classes
FORMATTED_ROW: Row HTML, if a row template is specified in the search configuration
ICON_TYPE: Type of the Icon: CLASS, URL, BLOB or INITIALS
ICON_VALUE: Icon Value, depending on the ICON TYPE
ICON_BLOB: BLOB containing the icon
ICON_MIMETYPE: Mimetype of the icon BLOB, if configured
TOTAL_ROW_COUNT: Total result count, if configured.
CONFIG_ID: Internal ID of the search configuration this result comes from.
例
次の例では、CUSTOMERS
およびPRODUCTS
検索構成内でoracle APEXを検索します。
select config_label, title, subtitle, badge
from table( apex_search.search(
p_search_static_ids => apex_t_varchar2( 'PRODUCTS', 'CUSTOMERS' ),
p_search_expression => 'oracle APEX',
p_apply_order_bys => 'N' ) );
CONFIG_LABEL TITLE SUBTITLE BADGE
-------------- ------------------ ----------------------- -------
Products APEX vacation app Subscription Based App
Products APEX time entry On-Premises License
:
Customers John Doe Corp Software Development 5000
Customers Development Corp Software Development 1000
:
親トピック: APEX_SEARCH