items
id | name | group
-----------------------------------------------------------
1 | /foo/ | app1
2 | /foo/1 | app1
3 | /bar/2 | app1
4 | /foo/abc/def | app1
5 | /foo3/ | app2
6 | /bar3/ | app2
mapping
id_a | id_b
--------------
1 | 2
3 | 4
mapping.id_a and mapping.id_b have foreign key references to item.id
I need to find if association exists between id_a and id_b in mapping table for a given input 'name' and 'group' using gino sqlalchemy.
Example:
- for input '/foo/', '/foo/1', 'app1' --> match success.
- for input '/bar/2', '/foo/abc/def', 'app1' --> match success.
- for input '/foo3/', '/bar3/', 'app2' --> match fails.