You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to create two functions that request our test postgresqlDB and return the result, these two SQLs are here:
SQL 1:
select * from trees
where
(
planting_organization_id in (select entity_id from getEntityRelationshipChildren(194))
)
order by id desc
SQL 2:
WITH RECURSIVE organization_children AS (
SELECT entity.id, entity_relationship.parent_id, 1 as depth, entity_relationship.type, entity_relati
FROM entity
LEFT JOIN entity_relationship ON entity_relationship.child_id = entity.id
WHERE entity.id = 194
UNION
SELECT next_child.id, entity_relationship.parent_id, depth + 1, entity_relationship.type, entity_rel
FROM entity next_child
JOIN entity_relationship ON entity_relationship.child_id = next_child.id
JOIN organization_children c ON entity_relationship.parent_id = c.id
)
,org_tree_id AS (
SELECT id FROM (
SELECT trees.id as id from trees
WHERE
planter_id IN (
SELECT id FROM planter
JOIN (
SELECT id AS entity_id FROM organization_children LIMIT 20
) org ON planter.organization_id = org.entity_id
)
UNION
select id from trees where planting_organization_id = (
194
)
) ids
)
select * from trees
where
(
id in (select id from org_tree_id)
)
order by id desc
limit 2
offset 1000;
When this is done, we will use our test tool to do a pressure test against these two and check the result.
The text was updated successfully, but these errors were encountered:
We aready setup our openfaas by Greenstand/treetracker-infrastructure#172
To finish this function, we need to setup the db connection with openfaas
We need to create two functions that request our test postgresqlDB and return the result, these two SQLs are here:
SQL 1:
SQL 2:
When this is done, we will use our test tool to do a pressure test against these two and check the result.
The text was updated successfully, but these errors were encountered: