Re: [python-sqlite] Digest for python-sqlite@googlegroups.com - 2 updates in 1 topic

8 views
Skip to first unread message

Charles Leifer

unread,
Nov 18, 2022, 8:05:21 AM11/18/22
to python...@googlegroups.com
You can compile the series extension as a loadable module and load it into your apsw connection as well.

On Fri, Nov 18, 2022, 6:37 AM <python...@googlegroups.com> wrote:
Jeremy Whetzel <jeremy....@gouletpens.com>: Nov 17 01:19PM -0800

Hello!
 
I'm trying to use generate_series() to build a table of integers. In
SQLite, this works:
 
SQLite version 3.39.4 2022-09-29 15:55:41
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> select value from generate_series(1, 10);
1
2
3
4
5
6
7
8
9
10
sqlite>
 
In apsw, it gives an error that there's no such table called
generate_series:
 
> python -m apsw database.sqlite
SQLite version 3.39.4 (APSW 3.39.4.0)
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select value from generate_series(1, 10);
SQLError: no such table: generate_series
sqlite>
 
I'm new to apsw, so I'm not sure if I'm just missing a step or something,
or if generate_series() actually isn't supported. If it's not supported,
I'd like to request support for it, please.
 
Thanks,
Jeremy
"Roger Binns" <rog...@rogerbinns.com>: Nov 17 03:21PM -0800

On Thu, 17 Nov 2022, at 13:19, 'Jeremy Whetzel' via python-sqlite wrote:
> I'm trying to use generate_series() to build a table of integers. In
> SQLite, this works:
 
It is included in the SQLite shell, but is not part of SQLite itself.
 
> In apsw, it gives an error that there's no such table called generate_series:
 
... which is why you won't see it using anything except the SQLite shell.
 
> something, or if generate_series() actually isn't supported. If it's
> not supported, I'd like to request support for it, please.
 
https://github.com/rogerbinns/apsw/issues/380
 
It would need be defined in Python code, and would also make a good example.
 
In the mean time you can use a recursive expression. See
 
https://www.sqlite.com/series.html
 
Roger
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to python-sqlit...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages