Commit Graph

23 Commits

Author SHA1 Message Date
drh 3561dd4afe Update the carray() and remember() extension functions so that they user
the new sqlite3_value_pointer() interface.

FossilOrigin-Name: a99fa94db7185b8eaf3c9b184cb1479f8b3d5781f71f1717a4b3f2dd1d184fe4
2017-06-30 23:46:16 +00:00
drh 59a40db3d2 Improved tests for the carray() table-valued function.
FossilOrigin-Name: 83a099f139aba03edac19c890a0019e922032a25
2017-02-03 15:16:25 +00:00
drh 6bada27205 Prototype for the remember(V,PTR) extension function.
FossilOrigin-Name: f0942c362f45ca1e986e142dbdd3ad957626dfb1
2016-08-09 21:08:42 +00:00
drh 2e3f87ae84 Change the name of the intarray() extension to carray() and give it an
optional third parameter that specifies the datatype as one of 'int32',
'int64', 'double', or 'char*'.  'int32' is the default.

FossilOrigin-Name: a204ba99db34b356acb259189158a32d2df25da0
2016-07-03 02:35:47 +00:00
drh ba637157ca Fix an off-by-one comparison in the intarray() virtual table. Get the
intarray() virtual table tests working using the legacy makefile.

FossilOrigin-Name: 7c3d441f2a9f642f3d91dcee854a4d16d298bc34
2016-07-02 20:57:06 +00:00
drh 2519b2a3e5 Merge the alternative table-valued function RHS of IN operator implementation
from trunk.

FossilOrigin-Name: 507fdbfb54ce377f0d870260b07d71b797843fcf
2016-07-02 20:51:31 +00:00
drh 5fbab882c0 Add support for table-valued functions on the RHS of an IN operator.
FossilOrigin-Name: ac6000f050ff4efcf8a87f0825077dbf4144f073
2016-07-02 12:08:14 +00:00
drh 2d05331444 Add the ability to have a table-valued function on the RHS of an IN operator.
FossilOrigin-Name: ba1b441b6003808810667d749635fe6b2e8c6165
2016-06-29 06:19:19 +00:00
drh 64131c15ab Another test case for the intarray($PTR,$N) virtual table.
FossilOrigin-Name: 06e1fab7527c6b4330a58f8d8873afaf2d67ae86
2016-06-29 05:08:01 +00:00
drh 4841624ab9 Add a prototype intarray($PTR,$N) table valued function.
FossilOrigin-Name: 233b33382dc70de45f90b6dfdb5785f20b21489e
2016-06-29 05:00:30 +00:00
drh dbc49161c0 Allow the left-hand side of IN operators on virtual tables to have the
aConstraintUsage[].omit flag clear.

FossilOrigin-Name: 1622623cbbfc4325c53d731aba78ca9c382ec612
2016-03-02 03:28:07 +00:00
drh 202923107d Do not allow table-valued function syntax on ordinary tables and views as those
objects are not table-valued functions.
Fix for ticket [73eba7ba5c7c0fc].

FossilOrigin-Name: ff5716b89f99d9c4568a39f1f52524528a631623
2015-11-21 13:24:46 +00:00
drh d12b636330 Improved substitution logic in the query flattener. Saves code space, and
(more importantly) works correctly with table-valued functions.

FossilOrigin-Name: 3d0bd95e977db50c314d33ec292f99e0539d7b4a
2015-10-11 19:46:59 +00:00
drh 6230212f4a Do not allow table-valued function syntax to be used on a view.
FossilOrigin-Name: 97cfe346e140e42a604375551f8168276bdbea11
2015-09-19 20:27:08 +00:00
drh b4d472f609 Eponymous virtual tables exist in the "main" schema only. Enforce this rule.
FossilOrigin-Name: 06f90bb274c4bb0c30585024c8d365d43c4162f2
2015-09-08 20:26:09 +00:00
drh 1f2fc28134 Fix a corner-case bug in table-valued functions. Update the generate_series()
virtual table to increase the performance estimate penalty for being
underspecified.

FossilOrigin-Name: 552bc9cb88bbe54b4cf5fdf66d1217e7a2047110
2015-08-21 17:14:48 +00:00
drh d8b1bfc6bf Fix corner-case memory management issues in table-valued functions. Change
virtual table handling so that if xDestroy is missing the table is
eponymous only even if xCreate is present.

FossilOrigin-Name: 774e6a14b124bbae4da0e188b62aee9ffb8c3745
2015-08-20 23:21:34 +00:00
drh d10dbad5e1 Correctly handle empty function argument lists on table-valued functions.
FossilOrigin-Name: a7acc7878b8bb8e27a0da67b2dbb7bd51df4859b
2015-08-20 20:13:37 +00:00
drh 509c3fc004 Fix eponymous virtual tables so that they do not automatically make the first
column the rowid.  Enhance the generate_series virtual table to support rowid.

FossilOrigin-Name: a325a08599759471047e234ef9cfcc3cb110aafd
2015-08-19 19:01:28 +00:00
drh bc550df32f Improved comments on the generate_series virtual table. Test cases for
ORDER BY rowid DESC with generate_series.

FossilOrigin-Name: fef44c37f31ca9fd7891cecdbe95cc46a987067b
2015-08-19 18:19:49 +00:00
drh 01d230ce05 A list of arguments following a table name translates into equality
constraints against hidden columns in that table.

FossilOrigin-Name: 40e12cfe4c29475417ba89fb637b4c763cf74016
2015-08-19 17:11:37 +00:00
drh 8a48b9c0b1 Minor refactor of the SrcList object so that it is able to hold the argument
list to a table-valued-function in the FROM clause.

FossilOrigin-Name: b919376147597c4b73421abe5788f893baf1560b
2015-08-19 15:20:00 +00:00
drh 398f872d1f Virtual table modules with a null xCreate method act as eponymous-only modules -
they cannot be used in a CREATE VIRTUAL TABLE statement.  Add the series.c
extension that implements a postgres-like generate_series virtual table to
demonstrate this capability.

FossilOrigin-Name: c58426dbd5ea8b8440ebcc1214f79fa63d658216
2015-08-19 13:54:20 +00:00