{ } Raw JSON

bundles / IPython 9.17.0 / IPython / core / history / HistoryAccessor / _run_sql

function

IPython.core.history:HistoryAccessor._run_sql

source: /dev/ipython/IPython/core/history.py:462

Signature

def _run_sql(self, sql: str, params: tuple, raw: bool = True, output: bool = False, latest: bool = False) → Iterable[tuple[int, int, InOrInOut]]

Summary

Prepares and runs an SQL query for the history database.

Parameters

sql : str

Any filtering expressions to go after SELECT ... FROM ...

params : tuple

Parameters passed to the SQL query (to replace "?")

raw, output : bool

See get_range

latest : bool

Select rows with max (session, line)

Returns

Tuples as : meth:`get_range`

Aliases

  • IPython.core.history.HistoryAccessor._run_sql