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
|