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

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -80,7 +80,7 @@ longitude
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -104,7 +104,7 @@ longitude
{{ record.longitude }}
</td>
<td>
<a href='{{servlet-context}}/form-addresses-Address?id={{ record.id}}'>
<a href='form-addresses-Address?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-authorities-Authority?id={{ record.id}}'>
<a href='form-authorities-Authority?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -92,7 +92,7 @@ authorised
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -122,7 +122,7 @@ authorised
{{ record.authorised }}
</td>
<td>
<a href='{{servlet-context}}/form-canvassers-Canvasser?id={{ record.id}}'>
<a href='form-canvassers-Canvasser?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -50,7 +50,7 @@ name
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -59,7 +59,7 @@ name
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-districts-District?id={{ record.id}}'>
<a href='form-districts-District?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ sub-address
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -68,7 +68,7 @@ sub-address
{{ record.sub-address }}
</td>
<td>
<a href='{{servlet-context}}/form-dwellings-Dwelling?id={{ record.id}}'>
<a href='form-dwellings-Dwelling?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -74,7 +74,7 @@ gender
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -95,7 +95,7 @@ gender
{{ record.gender }}
</td>
<td>
<a href='{{servlet-context}}/form-electors-Elector?id={{ record.id}}'>
<a href='form-electors-Elector?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -74,7 +74,7 @@ closed
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -95,7 +95,7 @@ closed
{{ record.closed }}
</td>
<td>
<a href='{{servlet-context}}/form-followupactions-Followupaction?id={{ record.id}}'>
<a href='form-followupactions-Followupaction?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-followupmethods-Followupmethod?id={{ record.id}}'>
<a href='form-followupmethods-Followupmethod?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -68,7 +68,7 @@ method_id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -86,7 +86,7 @@ method_id
{{ record.method_id }}
</td>
<td>
<a href='{{servlet-context}}/form-followuprequests-Followuprequest?id={{ record.id}}'>
<a href='form-followuprequests-Followuprequest?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-genders-Gender?id={{ record.id}}'>
<a href='form-genders-Gender?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ option_id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.visit_id }}
@ -68,7 +68,7 @@ option_id
{{ record.option_id }}
</td>
<td>
<a href='{{servlet-context}}/form-intentions-Intention?Id={{ record.Id}}'>
<a href='form-intentions-Intention?Id={{ record.Id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -56,7 +56,7 @@ current
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -68,7 +68,7 @@ current
{{ record.current }}
</td>
<td>
<a href='{{servlet-context}}/form-issues-Issue?id={{ record.id}}'>
<a href='form-issues-Issue?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -44,13 +44,13 @@ id
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
</td>
<td>
<a href='{{servlet-context}}/form-options-Option?id={{ record.id}}'>
<a href='form-options-Option?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -50,7 +50,7 @@ name
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -59,7 +59,7 @@ name
{{ record.name }}
</td>
<td>
<a href='{{servlet-context}}/form-roles-Role?id={{ record.id}}'>
<a href='form-roles-Role?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -68,7 +68,7 @@ longitude
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -86,7 +86,7 @@ longitude
{{ record.longitude }}
</td>
<td>
<a href='{{servlet-context}}/form-teams-Team?id={{ record.id}}'>
<a href='form-teams-Team?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,5 +1,5 @@
{% 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).-->
{% block head %}
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'/>
@ -62,7 +62,7 @@ date
</tr>
</thead>
<tbody>
{% for record in %records% %}
{% for record in records %}
<tr>
<td>
{{ record.id }}
@ -77,7 +77,7 @@ date
{{ record.date }}
</td>
<td>
<a href='{{servlet-context}}/form-visits-Visit?id={{ record.id}}'>
<a href='form-visits-Visit?id={{ record.id}}'>
View
</a>
</td>

View file

@ -1,13 +1,13 @@
(ns
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
[clojure.java.io :as io]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse]
[noir.util.route :as route]
[compojure.core :refer [defroutes GET POST]]
[ring.util.http-response :as response]
[clojure.java.io :as io]
[hugsql.core :as hugsql]
[youyesyet.layout :as l]
[youyesyet.db.core :as db]
[youyesyet.routes.manual :as m]))
@ -38,7 +38,11 @@
(resolve-template "list-electors-Electors.html")
{:title "Electors",
: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
form-electors-Elector
@ -58,7 +62,11 @@
(resolve-template "list-genders-Genders.html")
{:title "Genders",
: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
form-genders-Gender
@ -78,7 +86,11 @@
(resolve-template "list-dwellings-Dwellings.html")
{:title "Dwellings",
: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
form-dwellings-Dwelling
@ -98,7 +110,11 @@
(resolve-template "list-addresses-Addresses.html")
{:title "Addresses",
: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
form-addresses-Address
@ -116,7 +132,13 @@
[p (:form-params r)]
(l/render
(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
form-visits-Visit
@ -136,7 +158,11 @@
(resolve-template "list-authorities-Authorities.html")
{:title "Authorities",
: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
form-authorities-Authority
@ -154,7 +180,13 @@
[p (:form-params r)]
(l/render
(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
form-issues-Issue
@ -174,7 +206,11 @@
(resolve-template "list-intentions-Intentions.html")
{:title "Intentions",
: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
form-intentions-Intention
@ -194,7 +230,11 @@
(resolve-template "list-canvassers-Canvassers.html")
{:title "Canvassers",
: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
form-canvassers-Canvasser
@ -214,7 +254,11 @@
(resolve-template "list-followuprequests-Followuprequests.html")
{:title "Followuprequests",
: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
form-followuprequests-Followuprequest
@ -234,7 +278,13 @@
[p (:form-params r)]
(l/render
(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
form-roles-Role
@ -252,7 +302,13 @@
[p (:form-params r)]
(l/render
(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
form-teams-Team
@ -272,7 +328,11 @@
(resolve-template "list-districts-Districts.html")
{:title "Districts",
: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
form-districts-District
@ -292,7 +352,11 @@
(resolve-template "list-followupactions-Followupactions.html")
{:title "Followupactions",
: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
form-followupactions-Followupaction
@ -314,7 +378,11 @@
(resolve-template "list-options-Options.html")
{:title "Options",
: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
form-options-Option
@ -334,7 +402,11 @@
(resolve-template "list-followupmethods-Followupmethods.html")
{:title "Followupmethods",
: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
form-followupmethods-Followupmethod

View file

@ -1,13 +1,13 @@
(ns
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
[clojure.java.io :as io]
[compojure.core :refer [defroutes GET POST]]
[hugsql.core :as hugsql]
[noir.response :as nresponse]
[noir.util.route :as route]
[compojure.core :refer [defroutes GET POST]]
[ring.util.http-response :as response]
[clojure.java.io :as io]
[hugsql.core :as hugsql]
[youyesyet.db.core :as db]))