MCPcopy Index your code
hub / github.com/dbcli/pgcli / _should_limit_output

Method _should_limit_output

pgcli/main.py:1107–1114  ·  view source on GitHub ↗

returns True if the output should be truncated, False otherwise.

(self, sql, cur)

Source from the content-addressed store, hash-verified

1105 return prompt_app
1106
1107 def _should_limit_output(self, sql, cur):
1108 """returns True if the output should be truncated, False otherwise."""
1109 if self.explain_mode:
1110 return False
1111 if not is_select(sql):
1112 return False
1113
1114 return not self._has_limit(sql) and self.row_limit != 0 and cur and cur.rowcount > self.row_limit
1115
1116 def _has_limit(self, sql):
1117 if not sql:

Calls 2

_has_limitMethod · 0.95
is_selectFunction · 0.85