On 7/26/21 1:38 PM,
peng...@gmail.com wrote:
> I can get the columns of a table via the sqlite3 command line interface.
>
> sqlite> SELECT
c.name FROM pragma_table_info('foo') c
[...]
> But when I try it with apsw,
[...]
> cursor.execute("SELECT
c.name FROM pragma_table_info('foo') c")
>
> I got the following error. Is there a way to make it work with apsw? Thanks.
>
> Traceback (most recent call last):
> File "./main.py", line 9, in <module>
> cursor.execute("SELECT
c.name FROM pragma_table_info('foo') c")
> apsw.SQLError: SQLError: no such table: pragma_table_info
Pragmas as functions were added in SQLite 3.16 (January 2017). Your
SQLite shell is newer than that, and your APSW is older than that. This
will tell you what version of SQLite and APSW you are using:
print(apsw.sqlitelibversion(), apsw.apswversion())
Roger