tiled.queries.Like

class tiled.queries.Like(key: str, pattern: str)[source]

Query for an approximate string match.

This uses the SQL ‘LIKE’ operator.

Parameters:
keystr

e.g. “color”, “sample.name”

patternstr

e.g. “Ni%”

Examples

Search for sample starting with “Ni”

>>> c.search(Like("sample", "Ni%"))

Search for detector ending with “image”

>>> c.search(Like("detector", "%image"))
__init__(key: str, pattern: str) None

Methods

__init__(key, pattern)

decode(*, key, pattern)

encode()

Attributes

key

pattern