diff --git a/docs/query.rst b/docs/query.rst index 1506bb04c..b80bcb9c1 100644 --- a/docs/query.rst +++ b/docs/query.rst @@ -211,11 +211,11 @@ types. There is a default implementation for the CrateDB data types ``IP`` and >>> from crate.client.converter import DefaultTypeConverter >>> from crate.client.cursor import Cursor - >>> ccursor = connection.cursor(converter=DefaultTypeConverter()) + >>> cursor = connection.cursor(converter=DefaultTypeConverter()) - >>> ccursor.execute("SELECT datetime_tz, datetime_notz FROM locations ORDER BY name") + >>> cursor.execute("SELECT datetime_tz, datetime_notz FROM locations ORDER BY name") - >>> ccursor.fetchone() + >>> cursor.fetchone() [datetime.datetime(2022, 7, 18, 18, 10, 36, 758000), datetime.datetime(2022, 7, 18, 18, 10, 36, 758000)] @@ -238,11 +238,11 @@ converter function defined as ``lambda``, which assigns ``yes`` for boolean >>> converter = Converter() >>> converter.set(DataType.BOOLEAN, lambda value: value is True and "yes" or "no") - >>> ccursor = connection.cursor(converter=converter) + >>> cursor = connection.cursor(converter=converter) - >>> ccursor.execute("SELECT flag FROM locations ORDER BY name") + >>> cursor.execute("SELECT flag FROM locations ORDER BY name") - >>> ccursor.fetchone() + >>> cursor.fetchone() ['no']