sqlite3.Connection.executemany() does not support a RETURNING statement. All requests containing it fail with an exception: sqlite3.ProgrammingError: executemany() can only execute DML statements.
Working shell example
#!/bin/sh
rm -f ./test.db
sqlite3 ./test.db <<EOF
CREATE TABLE releases (
component VARCHAR(64) NOT NULL,
version VARCHAR(64) NOT NULL,
os VARCHAR(64) NOT NULL,
PRIMARY KEY (component, version, os));
INSERT INTO releases VALUES('server', '1.0.0', 'Unix'), ('server', '1.0.0', 'NT') RETURNING *;
EOF
zentarim commentedDec 5, 2022
•
edited
Problem
sqlite3.Connection.executemany()
does not support aRETURNING
statement. All requests containing it fail with an exception:sqlite3.ProgrammingError: executemany() can only execute DML statements.
Working shell example
Produces a relevant output:
However, a Python example doing similar thing:
generates an exception:
Environment
Ubuntu 22.04.1 LTS
Kernel 6.0.0-1006-oem
Python 3.10.6
sqlite3 module version: 2.6.0
sqlite3 package version: 3.37.2
Not sure if it is a bug or unimplemented feature.
Thanks in advance!
The text was updated successfully, but these errors were encountered: