I have a string, for which I need to find all records with matching prefixs:
path = '/abc/123/456'
session.query(Site).filter(path.startswith(Site.path_prefix))
The following records would match when path_prefix equals:
/abc
/ab
/abc/123
But not:
/asd
/abc/123/456/789
/kjk
Is this possible with SqlAlchemy, without switching over to python?