aboutsummaryrefslogtreecommitdiff
path: root/src/build.c
diff options
context:
space:
mode:
authordrh <drh@noemail.net>2015-08-19 17:11:37 +0000
committerdrh <drh@noemail.net>2015-08-19 17:11:37 +0000
commit01d230ce057ac505b064cdffcc01075eb387967c (patch)
treed0d6f5a00a82f7d151e9a14c58f9b9d77f7f420e /src/build.c
parent8a48b9c0b18e01b0fec665ad1c86a6fce5fbf1cf (diff)
downloadsqlite-01d230ce057ac505b064cdffcc01075eb387967c.tar.gz
sqlite-01d230ce057ac505b064cdffcc01075eb387967c.zip
A list of arguments following a table name translates into equality
constraints against hidden columns in that table. FossilOrigin-Name: 40e12cfe4c29475417ba89fb637b4c763cf74016
Diffstat (limited to 'src/build.c')
-rw-r--r--src/build.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/build.c b/src/build.c
index 3ff49d12b..96dc03a82 100644
--- a/src/build.c
+++ b/src/build.c
@@ -3798,6 +3798,21 @@ void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pIndexedBy){
}
/*
+** Add the list of function arguments to the SrcList entry for a
+** table-valued-function.
+*/
+void sqlite3SrcListFuncArgs(Parse *pParse, SrcList *p, ExprList *pList){
+ if( p && ALWAYS(p->nSrc>0) ){
+ struct SrcList_item *pItem = &p->a[p->nSrc-1];
+ assert( pItem->fg.notIndexed==0 );
+ assert( pItem->fg.isIndexedBy==0 );
+ assert( pItem->fg.isTabFunc==0 );
+ pItem->u1.pFuncArg = pList;
+ pItem->fg.isTabFunc = 1;
+ }
+}
+
+/*
** When building up a FROM clause in the parser, the join operator
** is initially attached to the left operand. But the code generator
** expects the join operator to be on the right operand. This routine