- args:
    cascade: true
    read_only: false
    sql: "CREATE OR REPLACE FUNCTION public.search_jobs(search text, startDate date,
      endDate date)\n RETURNS SETOF jobs\n LANGUAGE plpgsql\n STABLE\nAS $function$
      BEGIN if search = '' then return query\nselect *\nfrom jobs j;\nelse return
      query\nSELECT *\nFROM jobs j2\nWHERE  ownr_fn ILIKE '%' || search || '%'\n    or
      ownr_ln ILIKE '%' || search || '%'\n   \n    or clm_no ILIKE '%' || search ||
      '%'\n\nORDER BY \n     clm_no ILIKE '%' || search || '%'\n    OR null,\n    ownr_fn
      ILIKE '%' || search || '%'\n    OR NULL,\n   ownr_ln ILIKE '%' || search ||
      '%'\n    OR NULL;\nend if;\nEND $function$;"
  type: run_sql
- args:
    name: search_jobs
    schema: public
  type: track_function
