@@ -85,10 +85,10 @@ To bulk insert data you can use the ``executemany`` function::
8585 ... (name, date, kind, position) VALUES (?, ?, ?, ?)""",
8686 ... [('Cloverleaf', '2007-03-11', 'Quasar', 7),
8787 ... ('Old Faithful', '2007-03-11', 'Quasar', 7)])
88- [{u 'rowcount': 1}, {u 'rowcount': 1}]
88+ [{'rowcount': 1}, {'rowcount': 1}]
8989
9090``executemany`` returns a list of results for every parameter. Each result
91- contains a rowcount. If an error occures the rowcount is -2 and the result
91+ contains a rowcount. If an error occurs the rowcount is -2 and the result
9292may contain an ``error_message`` depending on the error.
9393
9494Refresh locations:
@@ -112,7 +112,7 @@ fetchone()
112112
113113 >>> result = cursor.fetchone()
114114 >>> pprint(result)
115- [u 'Algol']
115+ ['Algol']
116116
117117If no more data is available, an empty result is returned::
118118
@@ -129,19 +129,19 @@ the specified size of rows::
129129 >>> cursor.execute("SELECT name FROM locations order by name")
130130 >>> result = cursor.fetchmany(2)
131131 >>> pprint(result)
132- [[u 'Aldebaran'], [u 'Algol']]
132+ [['Aldebaran'], ['Algol']]
133133
134134If a size is not given, the cursor's arraysize, which defaults to '1',
135135determines the number of rows to be fetched::
136136
137137 >>> cursor.fetchmany()
138- [[u 'Allosimanius Syneca']]
138+ [['Allosimanius Syneca']]
139139
140140It's also possible to change the cursors arraysize to an other value::
141141
142142 >>> cursor.arraysize = 3
143143 >>> cursor.fetchmany()
144- [[u 'Alpha Centauri'], [u 'Altair'], [u 'Argabuthon']]
144+ [['Alpha Centauri'], ['Altair'], ['Argabuthon']]
145145
146146fetchall()
147147----------
@@ -219,7 +219,7 @@ be raised.
219219 >>> cursor.execute("SELECT * FROM locations")
220220 Traceback (most recent call last):
221221 ...
222- ProgrammingError: Cursor closed
222+ crate.client.exceptions. ProgrammingError: Cursor closed
223223
224224Closing the Connection
225225======================
@@ -235,9 +235,9 @@ operation using the connection is attempted to a closed connection an
235235 >>> cursor.execute("SELECT * FROM locations")
236236 Traceback (most recent call last):
237237 ...
238- ProgrammingError: Connection closed
238+ crate.client.exceptions. ProgrammingError: Connection closed
239239
240240 >>> cursor = connection.cursor()
241241 Traceback (most recent call last):
242242 ...
243- ProgrammingError: Connection closed
243+ crate.client.exceptions. ProgrammingError: Connection closed
0 commit comments