Fixed searching on all jobs page BOD-81

This commit is contained in:
Patrick Fic
2020-05-29 09:35:35 -07:00
parent a98e007141
commit c1aaf8b284
19 changed files with 100 additions and 56 deletions

View File

@@ -0,0 +1 @@
[]

View File

@@ -0,0 +1,12 @@
- args:
cascade: true
read_only: false
sql: "CREATE\r\nOR REPLACE FUNCTION public.search_jobs(search text) RETURNS SETOF
jobs LANGUAGE sql STABLE AS $function$\r\nSELECT\r\n *\r\nFROM\r\n jobs\r\nWHERE\r\n
\ search <% (ownr_fn || ' ' || ownr_ln || ' ' || ownr_co_nm\r\n|| ' ' || ro_number
\r\n|| ' ' || est_number \r\n|| ' ' || clm_no \r\n|| ' ' || ownr_ph1 \r\n||
' ' || ownr_ea \r\n|| ' ' || plate_no)\r\nORDER BY\r\n similarity(\r\n search,\r\n
\ (ownr_fn || ' ' || ownr_ln || ' ' || ownr_co_nm\r\n|| ' ' || ro_number
\r\n|| ' ' || est_number \r\n|| ' ' || clm_no \r\n|| ' ' || ownr_ph1 \r\n||
' ' || ownr_ea \r\n|| ' ' || plate_no)\r\n ) DESC\r\n$function$;"
type: run_sql