Skip to content

Update query.py#26

Merged
freeplant merged 17 commits intomasterfrom
python-api-optimize
Jan 15, 2021
Merged

Update query.py#26
freeplant merged 17 commits intomasterfrom
python-api-optimize

Conversation

@r350178982
Copy link
Contributor

No description provided.

if condition == '=':
for row in self.raw_rows:
if row.get(column) == value:
if self._exchange_cell_value(column_type, row.get(column)) == value:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

下面相同的可以简化

t_RBORDER = r'\)'
t_EQUAL = r'='
t_NOT_EQUAL = r'!='
t_NOT_EQUAL = r'!=|<>'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

正则‘或’需要加括号

value = self._parse_time(value)
return value

def _exchange_cell_value(self, column_type, value):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以和 _exchange_value 合并

@freeplant freeplant merged commit 15f1ba6 into master Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants