Add missing docstring.
This commit is contained in:
parent
4296eed429
commit
7d04f155c8
@ -49,6 +49,12 @@ class SqlCategory(QSqlQueryModel):
|
|||||||
self.set_pattern('', [0])
|
self.set_pattern('', [0])
|
||||||
|
|
||||||
def set_pattern(self, pattern, columns_to_filter):
|
def set_pattern(self, pattern, columns_to_filter):
|
||||||
|
"""Set the pattern used to filter results.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
pattern: string pattern to filter by.
|
||||||
|
columns_to_filter: indices of columns to apply pattern to.
|
||||||
|
"""
|
||||||
query = sql.run_query('select * from {} limit 1'.format(self.name))
|
query = sql.run_query('select * from {} limit 1'.format(self.name))
|
||||||
fields = [query.record().fieldName(i) for i in columns_to_filter]
|
fields = [query.record().fieldName(i) for i in columns_to_filter]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user