#23 Improve query parsing by using an existing library

已关闭
patrick.jattke8 年之前创建 · 0 条评论

The parsing process of queries is not robust and providing queries not recognized may lead to errors or unexpressive error messages. For example, submitting the query most_used(macAddr); prints the error message An error occurred: near "None": syntax error.

Therefore I suggest re-implementing the query parsing functionality in StatsDatabase.process_db_query and StatsDatabase._process_named_query. This can be realized by using an existing library such as pyparsing.

The parsing process of queries is not robust and providing queries not recognized may lead to errors or unexpressive error messages. For example, submitting the query ``most_used(macAddr);`` prints the error message ``An error occurred: near "None": syntax error``. Therefore I suggest re-implementing the query parsing functionality in `StatsDatabase.process_db_query` and `StatsDatabase._process_named_query`. This can be realized by using an existing library such as [pyparsing](http://pyparsing.wikispaces.com/).
登录 并参与到对话中。
未选择标签
Bug
未选择里程碑
未指派成员
1 名参与者
正在加载...
取消
保存
这个人很懒,什么都没留下。