@@ -24,25 +24,21 @@ def visit_constraint(self, node: Constraint) -> ColumnExpressionArgument:
2424 Tag .name .ilike (node .value ),
2525 Tag .shorthand .ilike (node .value ),
2626 TagAlias .name .ilike (node .value ),
27- aliased (Tag ).name .ilike (node .value ),
27+ # aliased(Tag).name.ilike(node.value),
2828 )
2929 elif node .type == ConstraintType .TagID :
3030 return Tag .id == int (node .value )
3131 elif node .type == ConstraintType .Path :
32- return Entry .path .ilike (node .value .replace ("*" , "%" )) # TODO TSQLANG this is broken
32+ return Entry .path .ilike (node .value .replace ("*" , "%" ))
3333 elif node .type == ConstraintType .MediaType :
3434 extensions : set [str ] = set [str ]()
3535 for media_cat in MediaCategories .ALL_CATEGORIES :
3636 if node .value == media_cat .name :
3737 extensions = extensions | media_cat .extensions
3838 break
39- return Entry .suffix .in_ (
40- map (lambda x : x .replace ("." , "" ), extensions )
41- ) # TODO audio doesn't work on mp3 files (might be my library)
39+ return Entry .suffix .in_ (map (lambda x : x .replace ("." , "" ), extensions ))
4240 elif node .type == ConstraintType .FileType :
43- return Entry .suffix .ilike (
44- node .value
45- ) # TODO TSQLANG this is broken for mp3, but works for png (might be my library)
41+ return Entry .suffix .ilike (node .value )
4642
4743 raise NotImplementedError ("This type of constraint is not implemented yet" )
4844
0 commit comments