Added find owner modal and basic searching logic.

This commit is contained in:
Patrick Fic
2020-01-29 12:00:50 -08:00
parent 7d6969b186
commit d7e195ff7f
21 changed files with 711 additions and 34 deletions

View File

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

View File

@@ -0,0 +1,14 @@
- args:
cascade: true
sql: "CREATE FUNCTION search_owners(search text)\r\nRETURNS SETOF owners AS $$\r\n
\ SELECT *\r\n FROM owners\r\n WHERE\r\n search <% (ownr_fn ||
' ' || ownr_ln || ' ' || ownr_addr1 || ' ' || ownr_city || ' ' || ownr_zip
\ || ' ' || ownr_ea || ' ' || ownr_ph1 || ' ' || ownr_ph2)\r\n ORDER BY\r\n
\ similarity(search, (ownr_fn || ' ' || ownr_ln || ' ' || ownr_addr1 ||
' ' || ownr_city || ' ' || ownr_zip || ' ' || ownr_ea || ' ' || ownr_ph1 ||
' ' || ownr_ph2)) DESC\r\n LIMIT 20;\r\n$$ LANGUAGE sql STABLE;"
type: run_sql
- args:
name: search_owners
schema: public
type: track_function