| 1119 | return any(token.match(sqlparse_tokens.Keyword, "LIMIT") for statement in sqlparse.parse(sql) for token in statement.flatten()) |
| 1120 | |
| 1121 | def _limit_output(self, cur): |
| 1122 | limit = min(self.row_limit, cur.rowcount) |
| 1123 | new_cur = itertools.islice(cur, limit) |
| 1124 | new_status = "SELECT " + str(limit) |
| 1125 | click.secho("The result was limited to %s rows" % limit, fg="red") |
| 1126 | |
| 1127 | return new_cur, new_status |
| 1128 | |
| 1129 | def _evaluate_command(self, text): |
| 1130 | """Used to run a command entered by the user during CLI operation |