List views now work

This commit is contained in:
Simon Brooke 2018-06-15 10:50:29 +01:00
parent 14abdb0dce
commit 6f09c0841c
36 changed files with 407 additions and 316 deletions

View file

@ -1,7 +1,7 @@
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- File queries.sql -- File queries.sql
-- --
-- autogenerated by adl.to-hugsql-queries at 2018-06-14T17:56:42.346Z -- autogenerated by adl.to-hugsql-queries at 2018-06-15T09:22:07.884Z
-- --
-- See [Application Description -- See [Application Description
-- Language](https://github.com/simon-brooke/adl). -- Language](https://github.com/simon-brooke/adl).
@ -380,67 +380,71 @@ ORDER BY visits.address_id,
-- :name list-addresses :? :* -- :name list-addresses :? :*
-- :doc lists all existing address records -- :doc lists all existing address records
SELECT * FROM addresses SELECT * FROM lv_addresses
ORDER BY addresses.address, ORDER BY lv_addresses.address,
addresses.postcode, lv_addresses.postcode,
addresses.id lv_addresses.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-addresses-by-district :? :* -- :name list-addresses-by-district :? :*
-- :doc lists all existing address records related to a given district -- :doc lists all existing address records related to a given district
SELECT * SELECT *
FROM addresses FROM lv_addresses, addresses
WHERE addresses.district_id = :id WHERE lv_addresses.id = addresses.id
ORDER BY addresses.address, AND addresses.district_id = :id
addresses.postcode, ORDER BY lv_addresses.address,
addresses.id lv_addresses.postcode,
lv_addresses.id
-- :name list-authorities :? :* -- :name list-authorities :? :*
-- :doc lists all existing authority records -- :doc lists all existing authority records
SELECT * FROM authorities SELECT * FROM lv_authorities
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-canvassers :? :* -- :name list-canvassers :? :*
-- :doc lists all existing canvasser records -- :doc lists all existing canvasser records
SELECT * FROM canvassers SELECT * FROM lv_canvassers
ORDER BY canvassers.username, ORDER BY lv_canvassers.username,
canvassers.fullname, lv_canvassers.fullname,
canvassers.email, lv_canvassers.email,
canvassers.id lv_canvassers.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-canvassers-by-address :? :* -- :name list-canvassers-by-address :? :*
-- :doc lists all existing canvasser records related to a given address -- :doc lists all existing canvasser records related to a given address
SELECT * SELECT *
FROM canvassers FROM lv_canvassers, canvassers
WHERE canvassers.address_id = :id WHERE lv_canvassers.id = canvassers.id
ORDER BY canvassers.username, AND canvassers.address_id = :id
canvassers.fullname, ORDER BY lv_canvassers.username,
canvassers.email, lv_canvassers.fullname,
canvassers.id lv_canvassers.email,
lv_canvassers.id
-- :name list-canvassers-by-authority :? :* -- :name list-canvassers-by-authority :? :*
-- :doc lists all existing canvasser records related to a given authority -- :doc lists all existing canvasser records related to a given authority
SELECT * SELECT *
FROM canvassers FROM lv_canvassers, canvassers
WHERE canvassers.authority_id = :id WHERE lv_canvassers.id = canvassers.id
ORDER BY canvassers.username, AND canvassers.authority_id = :id
canvassers.fullname, ORDER BY lv_canvassers.username,
canvassers.email, lv_canvassers.fullname,
canvassers.id lv_canvassers.email,
lv_canvassers.id
-- :name list-canvassers-by-elector :? :* -- :name list-canvassers-by-elector :? :*
-- :doc lists all existing canvasser records related to a given elector -- :doc lists all existing canvasser records related to a given elector
SELECT * SELECT *
FROM canvassers FROM lv_canvassers, canvassers
WHERE canvassers.elector_id = :id WHERE lv_canvassers.id = canvassers.id
ORDER BY canvassers.username, AND canvassers.elector_id = :id
canvassers.fullname, ORDER BY lv_canvassers.username,
canvassers.email, lv_canvassers.fullname,
canvassers.id lv_canvassers.email,
lv_canvassers.id
-- :name list-canvassers-by-role :? :* -- :name list-canvassers-by-role :? :*
-- :doc links all existing canvasser records related to a given role -- :doc links all existing canvasser records related to a given role
@ -455,193 +459,205 @@ ORDER BY canvassers.username,
-- :name list-districts :? :* -- :name list-districts :? :*
-- :doc lists all existing district records -- :doc lists all existing district records
SELECT * FROM districts SELECT * FROM lv_districts
ORDER BY districts.name, ORDER BY lv_districts.name,
districts.id lv_districts.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-dwellings :? :* -- :name list-dwellings :? :*
-- :doc lists all existing dwelling records -- :doc lists all existing dwelling records
SELECT * FROM dwellings SELECT * FROM lv_dwellings
ORDER BY dwellings.address_id, ORDER BY lv_dwellings.address_id,
dwellings.sub-address, lv_dwellings.sub-address,
dwellings.id lv_dwellings.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-dwellings-by-address :? :* -- :name list-dwellings-by-address :? :*
-- :doc lists all existing dwelling records related to a given address -- :doc lists all existing dwelling records related to a given address
SELECT * SELECT *
FROM dwellings FROM lv_dwellings, dwellings
WHERE dwellings.address_id = :id WHERE lv_dwellings.id = dwellings.id
ORDER BY dwellings.address_id, AND dwellings.address_id = :id
dwellings.sub-address, ORDER BY lv_dwellings.address_id,
dwellings.id lv_dwellings.sub-address,
lv_dwellings.id
-- :name list-electors :? :* -- :name list-electors :? :*
-- :doc lists all existing elector records -- :doc lists all existing elector records
SELECT * FROM electors SELECT * FROM lv_electors
ORDER BY electors.name, ORDER BY lv_electors.name,
electors.phone, lv_electors.phone,
electors.email, lv_electors.email,
electors.gender, lv_electors.gender,
electors.id lv_electors.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-electors-by-dwelling :? :* -- :name list-electors-by-dwelling :? :*
-- :doc lists all existing elector records related to a given dwelling -- :doc lists all existing elector records related to a given dwelling
SELECT * SELECT *
FROM electors FROM lv_electors, electors
WHERE electors.dwelling_id = :id WHERE lv_electors.id = electors.id
ORDER BY electors.name, AND electors.dwelling_id = :id
electors.phone, ORDER BY lv_electors.name,
electors.email, lv_electors.phone,
electors.gender, lv_electors.email,
electors.id lv_electors.gender,
lv_electors.id
-- :name list-electors-by-gender :? :* -- :name list-electors-by-gender :? :*
-- :doc lists all existing elector records related to a given gender -- :doc lists all existing elector records related to a given gender
SELECT * SELECT *
FROM electors FROM lv_electors, electors
WHERE electors.gender = :id WHERE lv_electors.id = electors.id
ORDER BY electors.name, AND electors.gender = :id
electors.phone, ORDER BY lv_electors.name,
electors.email, lv_electors.phone,
electors.gender, lv_electors.email,
electors.id lv_electors.gender,
lv_electors.id
-- :name list-followupactions :? :* -- :name list-followupactions :? :*
-- :doc lists all existing followupaction records -- :doc lists all existing followupaction records
SELECT * FROM followupactions SELECT * FROM lv_followupactions
ORDER BY followupactions.date, ORDER BY lv_followupactions.date,
followupactions.notes, lv_followupactions.notes,
followupactions.id lv_followupactions.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-followupactions-by-canvasser :? :* -- :name list-followupactions-by-canvasser :? :*
-- :doc lists all existing followupaction records related to a given canvasser -- :doc lists all existing followupaction records related to a given canvasser
SELECT * SELECT *
FROM followupactions FROM lv_followupactions, followupactions
WHERE followupactions.actor = :id WHERE lv_followupactions.id = followupactions.id
ORDER BY followupactions.date, AND followupactions.actor = :id
followupactions.notes, ORDER BY lv_followupactions.date,
followupactions.id lv_followupactions.notes,
lv_followupactions.id
-- :name list-followupactions-by-followuprequest :? :* -- :name list-followupactions-by-followuprequest :? :*
-- :doc lists all existing followupaction records related to a given followuprequest -- :doc lists all existing followupaction records related to a given followuprequest
SELECT * SELECT *
FROM followupactions FROM lv_followupactions, followupactions
WHERE followupactions.request_id = :id WHERE lv_followupactions.id = followupactions.id
ORDER BY followupactions.date, AND followupactions.request_id = :id
followupactions.notes, ORDER BY lv_followupactions.date,
followupactions.id lv_followupactions.notes,
lv_followupactions.id
-- :name list-followupmethods :? :* -- :name list-followupmethods :? :*
-- :doc lists all existing followupmethod records -- :doc lists all existing followupmethod records
SELECT * FROM followupmethods SELECT * FROM lv_followupmethods
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-followuprequests :? :* -- :name list-followuprequests :? :*
-- :doc lists all existing followuprequest records -- :doc lists all existing followuprequest records
SELECT * FROM followuprequests SELECT * FROM lv_followuprequests
ORDER BY followuprequests.elector_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.visit_id, lv_followuprequests.visit_id,
followuprequests.issue_id, lv_followuprequests.issue_id,
followuprequests.id lv_followuprequests.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-followuprequests-by-elector :? :* -- :name list-followuprequests-by-elector :? :*
-- :doc lists all existing followuprequest records related to a given elector -- :doc lists all existing followuprequest records related to a given elector
SELECT * SELECT *
FROM followuprequests FROM lv_followuprequests, followuprequests
WHERE followuprequests.elector_id = :id WHERE lv_followuprequests.id = followuprequests.id
ORDER BY followuprequests.elector_id, AND followuprequests.elector_id = :id
followuprequests.visit_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.issue_id, lv_followuprequests.visit_id,
followuprequests.id lv_followuprequests.issue_id,
lv_followuprequests.id
-- :name list-followuprequests-by-followupmethod :? :* -- :name list-followuprequests-by-followupmethod :? :*
-- :doc lists all existing followuprequest records related to a given followupmethod -- :doc lists all existing followuprequest records related to a given followupmethod
SELECT * SELECT *
FROM followuprequests FROM lv_followuprequests, followuprequests
WHERE followuprequests.method_id = :id WHERE lv_followuprequests.id = followuprequests.id
ORDER BY followuprequests.elector_id, AND followuprequests.method_id = :id
followuprequests.visit_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.issue_id, lv_followuprequests.visit_id,
followuprequests.id lv_followuprequests.issue_id,
lv_followuprequests.id
-- :name list-followuprequests-by-issue :? :* -- :name list-followuprequests-by-issue :? :*
-- :doc lists all existing followuprequest records related to a given issue -- :doc lists all existing followuprequest records related to a given issue
SELECT * SELECT *
FROM followuprequests FROM lv_followuprequests, followuprequests
WHERE followuprequests.issue_id = :id WHERE lv_followuprequests.id = followuprequests.id
ORDER BY followuprequests.elector_id, AND followuprequests.issue_id = :id
followuprequests.visit_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.issue_id, lv_followuprequests.visit_id,
followuprequests.id lv_followuprequests.issue_id,
lv_followuprequests.id
-- :name list-followuprequests-by-visit :? :* -- :name list-followuprequests-by-visit :? :*
-- :doc lists all existing followuprequest records related to a given visit -- :doc lists all existing followuprequest records related to a given visit
SELECT * SELECT *
FROM followuprequests FROM lv_followuprequests, followuprequests
WHERE followuprequests.visit_id = :id WHERE lv_followuprequests.id = followuprequests.id
ORDER BY followuprequests.elector_id, AND followuprequests.visit_id = :id
followuprequests.visit_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.issue_id, lv_followuprequests.visit_id,
followuprequests.id lv_followuprequests.issue_id,
lv_followuprequests.id
-- :name list-genders :? :* -- :name list-genders :? :*
-- :doc lists all existing gender records -- :doc lists all existing gender records
SELECT * FROM genders SELECT * FROM lv_genders
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-intentions :? :* -- :name list-intentions :? :*
-- :doc lists all existing intention records -- :doc lists all existing intention records
SELECT * FROM intentions SELECT * FROM lv_intentions
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-intentions-by-elector :? :* -- :name list-intentions-by-elector :? :*
-- :doc lists all existing intention records related to a given elector -- :doc lists all existing intention records related to a given elector
SELECT * SELECT *
FROM intentions FROM lv_intentions, intentions
WHERE intentions.elector_id = :id WHERE lv_intentions.Id = intentions.Id
AND intentions.elector_id = :id
-- :name list-intentions-by-option :? :* -- :name list-intentions-by-option :? :*
-- :doc lists all existing intention records related to a given option -- :doc lists all existing intention records related to a given option
SELECT * SELECT *
FROM intentions FROM lv_intentions, intentions
WHERE intentions.option_id = :id WHERE lv_intentions.Id = intentions.Id
AND intentions.option_id = :id
-- :name list-intentions-by-visit :? :* -- :name list-intentions-by-visit :? :*
-- :doc lists all existing intention records related to a given visit -- :doc lists all existing intention records related to a given visit
SELECT * SELECT *
FROM intentions FROM lv_intentions, intentions
WHERE intentions.visit_id = :id WHERE lv_intentions.Id = intentions.Id
AND intentions.visit_id = :id
-- :name list-issues :? :* -- :name list-issues :? :*
-- :doc lists all existing issue records -- :doc lists all existing issue records
SELECT * FROM issues SELECT * FROM lv_issues
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-options :? :* -- :name list-options :? :*
-- :doc lists all existing option records -- :doc lists all existing option records
SELECT * FROM options SELECT * FROM lv_options
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-roles :? :* -- :name list-roles :? :*
-- :doc lists all existing role records -- :doc lists all existing role records
SELECT * FROM roles SELECT * FROM lv_roles
ORDER BY roles.name, ORDER BY lv_roles.name,
roles.id lv_roles.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -656,9 +672,9 @@ ORDER BY roles.name,
-- :name list-teams :? :* -- :name list-teams :? :*
-- :doc lists all existing team records -- :doc lists all existing team records
SELECT * FROM teams SELECT * FROM lv_teams
ORDER BY teams.name, ORDER BY lv_teams.name,
teams.id lv_teams.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
@ -674,198 +690,201 @@ ORDER BY teams.name,
-- :name list-teams-by-district :? :* -- :name list-teams-by-district :? :*
-- :doc lists all existing team records related to a given district -- :doc lists all existing team records related to a given district
SELECT * SELECT *
FROM teams FROM lv_teams, teams
WHERE teams.district_id = :id WHERE lv_teams.id = teams.id
ORDER BY teams.name, AND teams.district_id = :id
teams.id ORDER BY lv_teams.name,
lv_teams.id
-- :name list-visits :? :* -- :name list-visits :? :*
-- :doc lists all existing visit records -- :doc lists all existing visit records
SELECT * FROM visits SELECT * FROM lv_visits
ORDER BY visits.address_id, ORDER BY lv_visits.address_id,
visits.date, lv_visits.date,
visits.id lv_visits.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name list-visits-by-address :? :* -- :name list-visits-by-address :? :*
-- :doc lists all existing visit records related to a given address -- :doc lists all existing visit records related to a given address
SELECT * SELECT *
FROM visits FROM lv_visits, visits
WHERE visits.address_id = :id WHERE lv_visits.id = visits.id
ORDER BY visits.address_id, AND visits.address_id = :id
visits.date, ORDER BY lv_visits.address_id,
visits.id lv_visits.date,
lv_visits.id
-- :name list-visits-by-canvasser :? :* -- :name list-visits-by-canvasser :? :*
-- :doc lists all existing visit records related to a given canvasser -- :doc lists all existing visit records related to a given canvasser
SELECT * SELECT *
FROM visits FROM lv_visits, visits
WHERE visits.canvasser_id = :id WHERE lv_visits.id = visits.id
ORDER BY visits.address_id, AND visits.canvasser_id = :id
visits.date, ORDER BY lv_visits.address_id,
visits.id lv_visits.date,
lv_visits.id
-- :name search-strings-address :? :1 -- :name search-strings-address :? :1
-- :doc selects existing address records having any string field matching `:pattern` by substring match -- :doc selects existing address records having any string field matching the parameter of the same name by substring match
SELECT * FROM addresses SELECT * FROM lv_addresses
WHERE WHERE
address LIKE '%:pattern%' address LIKE '%params.address%'
OR phone LIKE '%:pattern%' OR phone LIKE '%params.phone%'
ORDER BY addresses.address, ORDER BY lv_addresses.address,
addresses.postcode, lv_addresses.postcode,
addresses.id lv_addresses.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-authority :? :1 -- :name search-strings-authority :? :1
-- :doc selects existing authority records having any string field matching `:pattern` by substring match -- :doc selects existing authority records having any string field matching the parameter of the same name by substring match
SELECT * FROM authorities SELECT * FROM lv_authorities
WHERE WHERE
id LIKE '%:pattern%' id LIKE '%params.id%'
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-canvasser :? :1 -- :name search-strings-canvasser :? :1
-- :doc selects existing canvasser records having any string field matching `:pattern` by substring match -- :doc selects existing canvasser records having any string field matching the parameter of the same name by substring match
SELECT * FROM canvassers SELECT * FROM lv_canvassers
WHERE WHERE
username LIKE '%:pattern%' username LIKE '%params.username%'
OR fullname LIKE '%:pattern%' OR fullname LIKE '%params.fullname%'
OR phone LIKE '%:pattern%' OR phone LIKE '%params.phone%'
OR email LIKE '%:pattern%' OR email LIKE '%params.email%'
ORDER BY canvassers.username, ORDER BY lv_canvassers.username,
canvassers.fullname, lv_canvassers.fullname,
canvassers.email, lv_canvassers.email,
canvassers.id lv_canvassers.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-district :? :1 -- :name search-strings-district :? :1
-- :doc selects existing district records having any string field matching `:pattern` by substring match -- :doc selects existing district records having any string field matching the parameter of the same name by substring match
SELECT * FROM districts SELECT * FROM lv_districts
WHERE WHERE
name LIKE '%:pattern%' name LIKE '%params.name%'
ORDER BY districts.name, ORDER BY lv_districts.name,
districts.id lv_districts.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-dwelling :? :1 -- :name search-strings-dwelling :? :1
-- :doc selects existing dwelling records having any string field matching `:pattern` by substring match -- :doc selects existing dwelling records having any string field matching the parameter of the same name by substring match
SELECT * FROM dwellings SELECT * FROM lv_dwellings
WHERE WHERE
sub-address LIKE '%:pattern%' sub-address LIKE '%params.sub-address%'
ORDER BY dwellings.address_id, ORDER BY lv_dwellings.address_id,
dwellings.sub-address, lv_dwellings.sub-address,
dwellings.id lv_dwellings.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-elector :? :1 -- :name search-strings-elector :? :1
-- :doc selects existing elector records having any string field matching `:pattern` by substring match -- :doc selects existing elector records having any string field matching the parameter of the same name by substring match
SELECT * FROM electors SELECT * FROM lv_electors
WHERE WHERE
name LIKE '%:pattern%' name LIKE '%params.name%'
OR phone LIKE '%:pattern%' OR phone LIKE '%params.phone%'
OR email LIKE '%:pattern%' OR email LIKE '%params.email%'
ORDER BY electors.name, ORDER BY lv_electors.name,
electors.phone, lv_electors.phone,
electors.email, lv_electors.email,
electors.gender, lv_electors.gender,
electors.id lv_electors.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followupaction :? :1 -- :name search-strings-followupaction :? :1
-- :doc selects existing followupaction records having any string field matching `:pattern` by substring match -- :doc selects existing followupaction records having any string field matching the parameter of the same name by substring match
SELECT * FROM followupactions SELECT * FROM lv_followupactions
WHERE WHERE
notes LIKE '%:pattern%' notes LIKE '%params.notes%'
ORDER BY followupactions.date, ORDER BY lv_followupactions.date,
followupactions.notes, lv_followupactions.notes,
followupactions.id lv_followupactions.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followupmethod :? :1 -- :name search-strings-followupmethod :? :1
-- :doc selects existing followupmethod records having any string field matching `:pattern` by substring match -- :doc selects existing followupmethod records having any string field matching the parameter of the same name by substring match
SELECT * FROM followupmethods SELECT * FROM lv_followupmethods
WHERE WHERE
id LIKE '%:pattern%' id LIKE '%params.id%'
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-followuprequest :? :1 -- :name search-strings-followuprequest :? :1
-- :doc selects existing followuprequest records having any string field matching `:pattern` by substring match -- :doc selects existing followuprequest records having any string field matching the parameter of the same name by substring match
SELECT * FROM followuprequests SELECT * FROM lv_followuprequests
WHERE WHERE
ORDER BY followuprequests.elector_id, ORDER BY lv_followuprequests.elector_id,
followuprequests.visit_id, lv_followuprequests.visit_id,
followuprequests.issue_id, lv_followuprequests.issue_id,
followuprequests.id lv_followuprequests.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-gender :? :1 -- :name search-strings-gender :? :1
-- :doc selects existing gender records having any string field matching `:pattern` by substring match -- :doc selects existing gender records having any string field matching the parameter of the same name by substring match
SELECT * FROM genders SELECT * FROM lv_genders
WHERE WHERE
id LIKE '%:pattern%' id LIKE '%params.id%'
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-intention :? :1 -- :name search-strings-intention :? :1
-- :doc selects existing intention records having any string field matching `:pattern` by substring match -- :doc selects existing intention records having any string field matching the parameter of the same name by substring match
SELECT * FROM intentions SELECT * FROM lv_intentions
WHERE WHERE
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-issue :? :1 -- :name search-strings-issue :? :1
-- :doc selects existing issue records having any string field matching `:pattern` by substring match -- :doc selects existing issue records having any string field matching the parameter of the same name by substring match
SELECT * FROM issues SELECT * FROM lv_issues
WHERE WHERE
url LIKE '%:pattern%' url LIKE '%params.url%'
OR id LIKE '%:pattern%' OR id LIKE '%params.id%'
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-option :? :1 -- :name search-strings-option :? :1
-- :doc selects existing option records having any string field matching `:pattern` by substring match -- :doc selects existing option records having any string field matching the parameter of the same name by substring match
SELECT * FROM options SELECT * FROM lv_options
WHERE WHERE
id LIKE '%:pattern%' id LIKE '%params.id%'
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-role :? :1 -- :name search-strings-role :? :1
-- :doc selects existing role records having any string field matching `:pattern` by substring match -- :doc selects existing role records having any string field matching the parameter of the same name by substring match
SELECT * FROM roles SELECT * FROM lv_roles
WHERE WHERE
name LIKE '%:pattern%' name LIKE '%params.name%'
ORDER BY roles.name, ORDER BY lv_roles.name,
roles.id lv_roles.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-team :? :1 -- :name search-strings-team :? :1
-- :doc selects existing team records having any string field matching `:pattern` by substring match -- :doc selects existing team records having any string field matching the parameter of the same name by substring match
SELECT * FROM teams SELECT * FROM lv_teams
WHERE WHERE
name LIKE '%:pattern%' name LIKE '%params.name%'
ORDER BY teams.name, ORDER BY lv_teams.name,
teams.id lv_teams.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")
-- :name search-strings-visit :? :1 -- :name search-strings-visit :? :1
-- :doc selects existing visit records having any string field matching `:pattern` by substring match -- :doc selects existing visit records having any string field matching the parameter of the same name by substring match
SELECT * FROM visits SELECT * FROM lv_visits
WHERE WHERE
ORDER BY visits.address_id, ORDER BY lv_visits.address_id,
visits.date, lv_visits.date,
visits.id lv_visits.id
--~ (if (:offset params) "OFFSET :offset ") --~ (if (:offset params) "OFFSET :offset ")
--~ (if (:limit params) "LIMIT :limit" "LIMIT 100") --~ (if (:limit params) "LIMIT :limit" "LIMIT 100")

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File application-index.html generated 2018-06-14T19:58:20.328Z by adl.to-selmer-templates. <!-- File application-index.html generated 2018-06-15T08:47:04.322Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-addresses-Address.html generated 2018-06-14T19:58:20.317Z by adl.to-selmer-templates. <!-- File form-addresses-Address.html generated 2018-06-15T08:47:04.309Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-authorities-Authority.html generated 2018-06-14T19:58:20.335Z by adl.to-selmer-templates. <!-- File form-authorities-Authority.html generated 2018-06-15T08:47:04.329Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-canvassers-Canvasser.html generated 2018-06-14T19:58:20.337Z by adl.to-selmer-templates. <!-- File form-canvassers-Canvasser.html generated 2018-06-15T08:47:04.331Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-districts-District.html generated 2018-06-14T19:58:20.306Z by adl.to-selmer-templates. <!-- File form-districts-District.html generated 2018-06-15T08:47:04.299Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-dwellings-Dwelling.html generated 2018-06-14T19:58:20.346Z by adl.to-selmer-templates. <!-- File form-dwellings-Dwelling.html generated 2018-06-15T08:47:04.340Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-electors-Elector.html generated 2018-06-14T19:58:20.332Z by adl.to-selmer-templates. <!-- File form-electors-Elector.html generated 2018-06-15T08:47:04.327Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-followupactions-Followupaction.html generated 2018-06-14T19:58:20.348Z by adl.to-selmer-templates. <!-- File form-followupactions-Followupaction.html generated 2018-06-15T08:47:04.342Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-followupmethods-Followupmethod.html generated 2018-06-14T19:58:20.351Z by adl.to-selmer-templates. <!-- File form-followupmethods-Followupmethod.html generated 2018-06-15T08:47:04.344Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-followuprequests-Followuprequest.html generated 2018-06-14T19:58:20.310Z by adl.to-selmer-templates. <!-- File form-followuprequests-Followuprequest.html generated 2018-06-15T08:47:04.302Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-genders-Gender.html generated 2018-06-14T19:58:20.298Z by adl.to-selmer-templates. <!-- File form-genders-Gender.html generated 2018-06-15T08:47:04.293Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-intentions-Intention.html generated 2018-06-14T19:58:20.343Z by adl.to-selmer-templates. <!-- File form-intentions-Intention.html generated 2018-06-15T08:47:04.336Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-issues-Issue.html generated 2018-06-14T19:58:20.321Z by adl.to-selmer-templates. <!-- File form-issues-Issue.html generated 2018-06-15T08:47:04.314Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-options-Option.html generated 2018-06-14T19:58:20.342Z by adl.to-selmer-templates. <!-- File form-options-Option.html generated 2018-06-15T08:47:04.336Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-roles-Role.html generated 2018-06-14T19:58:20.323Z by adl.to-selmer-templates. <!-- File form-roles-Role.html generated 2018-06-15T08:47:04.316Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-teams-Team.html generated 2018-06-14T19:58:20.329Z by adl.to-selmer-templates. <!-- File form-teams-Team.html generated 2018-06-15T08:47:04.323Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File form-visits-Visit.html generated 2018-06-14T19:58:20.326Z by adl.to-selmer-templates. <!-- File form-visits-Visit.html generated 2018-06-15T08:47:04.319Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-addresses-Addresses.html generated 2018-06-14T19:58:20.336Z by adl.to-selmer-templates. <!-- File list-addresses-Addresses.html generated 2018-06-15T08:47:04.330Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -80,7 +80,7 @@ longitude
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -104,7 +104,7 @@ longitude
{{ record.longitude }} {{ record.longitude }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.id}}'> <a href='form-addresses-Address?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-authorities-Authorities.html generated 2018-06-14T19:58:20.309Z by adl.to-selmer-templates. <!-- File list-authorities-Authorities.html generated 2018-06-15T08:47:04.301Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.id}}'> <a href='form-authorities-Authority?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-canvassers-Canvassers.html generated 2018-06-14T19:58:20.345Z by adl.to-selmer-templates. <!-- File list-canvassers-Canvassers.html generated 2018-06-15T08:47:04.339Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -92,7 +92,7 @@ authorised
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -122,7 +122,7 @@ authorised
{{ record.authorised }} {{ record.authorised }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id}}'> <a href='form-canvassers-Canvasser?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-districts-Districts.html generated 2018-06-14T19:58:20.341Z by adl.to-selmer-templates. <!-- File list-districts-Districts.html generated 2018-06-15T08:47:04.334Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -50,7 +50,7 @@ name
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -59,7 +59,7 @@ name
{{ record.name }} {{ record.name }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-districts-District?id={{ record.id}}'> <a href='form-districts-District?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-dwellings-Dwellings.html generated 2018-06-14T19:58:20.334Z by adl.to-selmer-templates. <!-- File list-dwellings-Dwellings.html generated 2018-06-15T08:47:04.329Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ sub-address
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -68,7 +68,7 @@ sub-address
{{ record.sub-address }} {{ record.sub-address }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-dwellings-Dwelling?id={{ record.id}}'> <a href='form-dwellings-Dwelling?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-electors-Electors.html generated 2018-06-14T19:58:20.320Z by adl.to-selmer-templates. <!-- File list-electors-Electors.html generated 2018-06-15T08:47:04.313Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -74,7 +74,7 @@ gender
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -95,7 +95,7 @@ gender
{{ record.gender }} {{ record.gender }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.id}}'> <a href='form-electors-Elector?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-followupactions-Followupactions.html generated 2018-06-14T19:58:20.345Z by adl.to-selmer-templates. <!-- File list-followupactions-Followupactions.html generated 2018-06-15T08:47:04.338Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -74,7 +74,7 @@ closed
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -95,7 +95,7 @@ closed
{{ record.closed }} {{ record.closed }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-followupactions-Followupaction?id={{ record.id}}'> <a href='form-followupactions-Followupaction?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-followupmethods-Followupmethods.html generated 2018-06-14T19:58:20.325Z by adl.to-selmer-templates. <!-- File list-followupmethods-Followupmethods.html generated 2018-06-15T08:47:04.318Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.id}}'> <a href='form-followupmethods-Followupmethod?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-followuprequests-Followuprequests.html generated 2018-06-14T19:58:20.303Z by adl.to-selmer-templates. <!-- File list-followuprequests-Followuprequests.html generated 2018-06-15T08:47:04.296Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -68,7 +68,7 @@ method_id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -86,7 +86,7 @@ method_id
{{ record.method_id }} {{ record.method_id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest?id={{ record.id}}'> <a href='form-followuprequests-Followuprequest?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-genders-Genders.html generated 2018-06-14T19:58:20.293Z by adl.to-selmer-templates. <!-- File list-genders-Genders.html generated 2018-06-15T08:47:04.288Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-genders-Gender?id={{ record.id}}'> <a href='form-genders-Gender?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-intentions-Intentions.html generated 2018-06-14T19:58:20.348Z by adl.to-selmer-templates. <!-- File list-intentions-Intentions.html generated 2018-06-15T08:47:04.341Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ option_id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.visit_id }} {{ record.visit_id }}
@ -68,7 +68,7 @@ option_id
{{ record.option_id }} {{ record.option_id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-intentions-Intention?Id={{ record.Id}}'> <a href='form-intentions-Intention?Id={{ record.Id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-issues-Issues.html generated 2018-06-14T19:58:20.342Z by adl.to-selmer-templates. <!-- File list-issues-Issues.html generated 2018-06-15T08:47:04.335Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ current
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -68,7 +68,7 @@ current
{{ record.current }} {{ record.current }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.id}}'> <a href='form-issues-Issue?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-options-Options.html generated 2018-06-14T19:58:20.305Z by adl.to-selmer-templates. <!-- File list-options-Options.html generated 2018-06-15T08:47:04.298Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-options-Option?id={{ record.id}}'> <a href='form-options-Option?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-roles-Roles.html generated 2018-06-14T19:58:20.325Z by adl.to-selmer-templates. <!-- File list-roles-Roles.html generated 2018-06-15T08:47:04.318Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -50,7 +50,7 @@ name
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -59,7 +59,7 @@ name
{{ record.name }} {{ record.name }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-roles-Role?id={{ record.id}}'> <a href='form-roles-Role?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-teams-Teams.html generated 2018-06-14T19:58:20.297Z by adl.to-selmer-templates. <!-- File list-teams-Teams.html generated 2018-06-15T08:47:04.292Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -68,7 +68,7 @@ longitude
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -86,7 +86,7 @@ longitude
{{ record.longitude }} {{ record.longitude }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-teams-Team?id={{ record.id}}'> <a href='form-teams-Team?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,5 +1,5 @@
{% extends "base.html" %} {% extends "base.html" %}
<!-- File list-visits-Visits.html generated 2018-06-14T19:58:20.295Z by adl.to-selmer-templates. <!-- File list-visits-Visits.html generated 2018-06-15T08:47:04.290Z by adl.to-selmer-templates.
See [Application Description Language](https://github.com/simon-brooke/adl).--> See [Application Description Language](https://github.com/simon-brooke/adl).-->
{% block head %} {% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/> <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -62,7 +62,7 @@ date
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for record in %records% %} {% for record in records %}
<tr> <tr>
<td> <td>
{{ record.id }} {{ record.id }}
@ -77,7 +77,7 @@ date
{{ record.date }} {{ record.date }}
</td> </td>
<td> <td>
<a href='{{servlet-context}}/form-visits-Visit?id={{ record.id}}'> <a href='form-visits-Visit?id={{ record.id}}'>
View View
</a> </a>
</td> </td>

View file

@ -1,13 +1,13 @@
(ns (ns
youyesyet.routes.auto youyesyet.routes.auto
"User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180614T175643.413Z" "User interface routes for Youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180615T084444.957Z"
(:require (:require
[clojure.java.io :as io]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse] [noir.response :as nresponse]
[noir.util.route :as route] [noir.util.route :as route]
[compojure.core :refer [defroutes GET POST]]
[ring.util.http-response :as response] [ring.util.http-response :as response]
[clojure.java.io :as io]
[hugsql.core :as hugsql]
[youyesyet.layout :as l] [youyesyet.layout :as l]
[youyesyet.db.core :as db] [youyesyet.db.core :as db]
[youyesyet.routes.manual :as m])) [youyesyet.routes.manual :as m]))
@ -38,7 +38,11 @@
(resolve-template "list-electors-Electors.html") (resolve-template "list-electors-Electors.html")
{:title "Electors", {:title "Electors",
:params p, :params p,
:records (db/search-strings-elector p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-elector db/*db* p)
(db/list-electors db/*db* {}))})))
(defn (defn
form-electors-Elector form-electors-Elector
@ -58,7 +62,11 @@
(resolve-template "list-genders-Genders.html") (resolve-template "list-genders-Genders.html")
{:title "Genders", {:title "Genders",
:params p, :params p,
:records (db/search-strings-gender p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-gender db/*db* p)
(db/list-genders db/*db* {}))})))
(defn (defn
form-genders-Gender form-genders-Gender
@ -78,7 +86,11 @@
(resolve-template "list-dwellings-Dwellings.html") (resolve-template "list-dwellings-Dwellings.html")
{:title "Dwellings", {:title "Dwellings",
:params p, :params p,
:records (db/search-strings-dwelling p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-dwelling db/*db* p)
(db/list-dwellings db/*db* {}))})))
(defn (defn
form-dwellings-Dwelling form-dwellings-Dwelling
@ -98,7 +110,11 @@
(resolve-template "list-addresses-Addresses.html") (resolve-template "list-addresses-Addresses.html")
{:title "Addresses", {:title "Addresses",
:params p, :params p,
:records (db/search-strings-address p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-address db/*db* p)
(db/list-addresses db/*db* {}))})))
(defn (defn
form-addresses-Address form-addresses-Address
@ -116,7 +132,13 @@
[p (:form-params r)] [p (:form-params r)]
(l/render (l/render
(resolve-template "list-visits-Visits.html") (resolve-template "list-visits-Visits.html")
{:title "Visits", :params p, :records (db/search-strings-visit p)}))) {:title "Visits",
:params p,
:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-visit db/*db* p)
(db/list-visits db/*db* {}))})))
(defn (defn
form-visits-Visit form-visits-Visit
@ -136,7 +158,11 @@
(resolve-template "list-authorities-Authorities.html") (resolve-template "list-authorities-Authorities.html")
{:title "Authorities", {:title "Authorities",
:params p, :params p,
:records (db/search-strings-authority p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-authority db/*db* p)
(db/list-authorities db/*db* {}))})))
(defn (defn
form-authorities-Authority form-authorities-Authority
@ -154,7 +180,13 @@
[p (:form-params r)] [p (:form-params r)]
(l/render (l/render
(resolve-template "list-issues-Issues.html") (resolve-template "list-issues-Issues.html")
{:title "Issues", :params p, :records (db/search-strings-issue p)}))) {:title "Issues",
:params p,
:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-issue db/*db* p)
(db/list-issues db/*db* {}))})))
(defn (defn
form-issues-Issue form-issues-Issue
@ -174,7 +206,11 @@
(resolve-template "list-intentions-Intentions.html") (resolve-template "list-intentions-Intentions.html")
{:title "Intentions", {:title "Intentions",
:params p, :params p,
:records (db/search-strings-intention p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-intention db/*db* p)
(db/list-intentions db/*db* {}))})))
(defn (defn
form-intentions-Intention form-intentions-Intention
@ -194,7 +230,11 @@
(resolve-template "list-canvassers-Canvassers.html") (resolve-template "list-canvassers-Canvassers.html")
{:title "Canvassers", {:title "Canvassers",
:params p, :params p,
:records (db/search-strings-canvasser p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-canvasser db/*db* p)
(db/list-canvassers db/*db* {}))})))
(defn (defn
form-canvassers-Canvasser form-canvassers-Canvasser
@ -214,7 +254,11 @@
(resolve-template "list-followuprequests-Followuprequests.html") (resolve-template "list-followuprequests-Followuprequests.html")
{:title "Followuprequests", {:title "Followuprequests",
:params p, :params p,
:records (db/search-strings-followuprequest p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followuprequest db/*db* p)
(db/list-followuprequests db/*db* {}))})))
(defn (defn
form-followuprequests-Followuprequest form-followuprequests-Followuprequest
@ -234,7 +278,13 @@
[p (:form-params r)] [p (:form-params r)]
(l/render (l/render
(resolve-template "list-roles-Roles.html") (resolve-template "list-roles-Roles.html")
{:title "Roles", :params p, :records (db/search-strings-role p)}))) {:title "Roles",
:params p,
:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-role db/*db* p)
(db/list-roles db/*db* {}))})))
(defn (defn
form-roles-Role form-roles-Role
@ -252,7 +302,13 @@
[p (:form-params r)] [p (:form-params r)]
(l/render (l/render
(resolve-template "list-teams-Teams.html") (resolve-template "list-teams-Teams.html")
{:title "Teams", :params p, :records (db/search-strings-team p)}))) {:title "Teams",
:params p,
:records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-team db/*db* p)
(db/list-teams db/*db* {}))})))
(defn (defn
form-teams-Team form-teams-Team
@ -272,7 +328,11 @@
(resolve-template "list-districts-Districts.html") (resolve-template "list-districts-Districts.html")
{:title "Districts", {:title "Districts",
:params p, :params p,
:records (db/search-strings-district p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-district db/*db* p)
(db/list-districts db/*db* {}))})))
(defn (defn
form-districts-District form-districts-District
@ -292,7 +352,11 @@
(resolve-template "list-followupactions-Followupactions.html") (resolve-template "list-followupactions-Followupactions.html")
{:title "Followupactions", {:title "Followupactions",
:params p, :params p,
:records (db/search-strings-followupaction p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followupaction db/*db* p)
(db/list-followupactions db/*db* {}))})))
(defn (defn
form-followupactions-Followupaction form-followupactions-Followupaction
@ -314,7 +378,11 @@
(resolve-template "list-options-Options.html") (resolve-template "list-options-Options.html")
{:title "Options", {:title "Options",
:params p, :params p,
:records (db/search-strings-option p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-option db/*db* p)
(db/list-options db/*db* {}))})))
(defn (defn
form-options-Option form-options-Option
@ -334,7 +402,11 @@
(resolve-template "list-followupmethods-Followupmethods.html") (resolve-template "list-followupmethods-Followupmethods.html")
{:title "Followupmethods", {:title "Followupmethods",
:params p, :params p,
:records (db/search-strings-followupmethod p)}))) :records
(if
(not (empty? (remove nil? (vals p))))
(db/search-strings-followupmethod db/*db* p)
(db/list-followupmethods db/*db* {}))})))
(defn (defn
form-followupmethods-Followupmethod form-followupmethods-Followupmethod

View file

@ -1,13 +1,13 @@
(ns (ns
youyesyet.routes.auto-json youyesyet.routes.auto-json
"JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180614T175642.456Z" "JSON routes for youyesyet auto-generated by [Application Description Language framework](https://github.com/simon-brooke/adl) at 20180615T084443.981Z"
(:require (:require
[clojure.java.io :as io]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse] [noir.response :as nresponse]
[noir.util.route :as route] [noir.util.route :as route]
[compojure.core :refer [defroutes GET POST]]
[ring.util.http-response :as response] [ring.util.http-response :as response]
[clojure.java.io :as io]
[hugsql.core :as hugsql]
[youyesyet.db.core :as db])) [youyesyet.db.core :as db]))