Home
last modified time | relevance | path

Searched refs:pSelect (Results 1 – 25 of 32) sorted by relevance

12

/sqlite-3.40.0/test/
H A Dwordcount.c282 sqlite3_stmt *pSelect = 0; /* The SELECT statement */ in main() local
434 -1, &pSelect, 0); in main()
441 -1, &pSelect, 0); in main()
511 rc = sqlite3_step(pSelect); in main()
512 sqlite3_reset(pSelect); in main()
530 if( sqlite3_step(pSelect)==SQLITE_ROW ){ in main()
531 sumCnt += sqlite3_column_int64(pSelect, 0); in main()
533 sqlite3_reset(pSelect); in main()
562 sqlite3_finalize(pSelect); pSelect = 0; in main()
568 &pSelect, 0); in main()
[all …]
/sqlite-3.40.0/src/
H A Dresolve.c1369 pEList = pSelect->pEList; in resolveOrderByTermToExprList()
1451 pSelect->pNext = 0; in resolveCompoundOrderBy()
1452 while( pSelect->pPrior ){ in resolveCompoundOrderBy()
1453 pSelect->pPrior->pNext = pSelect; in resolveCompoundOrderBy()
1454 pSelect = pSelect->pPrior; in resolveCompoundOrderBy()
1459 pEList = pSelect->pEList; in resolveCompoundOrderBy()
1522 pSelect = pSelect->pNext; in resolveCompoundOrderBy()
1560 pEList = pSelect->pEList; in sqlite3ResolveOrderGroupBy()
1592 if( pSelect->pWin ){ in windowRemoveExprFromSelect()
1596 sWalker.u.pSelect = pSelect; in windowRemoveExprFromSelect()
[all …]
H A Dalter.c823 With *pWith = pSelect->pWith; in renameWalkWith()
839 Select *p = pWith->a[i].pSelect; in renameWalkWith()
1313 if( pStep->pSelect ){ in renameResolveTrigger()
1340 if( p->pSelect ){ in renameResolveTrigger()
1517 Select *pSelect = sParse.pNewTable->u.view.pSelect; in renameColumnFunc() local
1518 pSelect->selFlags &= ~SF_View; in renameColumnFunc()
1645 SrcList *pSrc = pSelect->pSrc; in renameTableSelectCb()
1661 renameWalkWith(pWalker, pSelect); in renameTableSelectCb()
1730 Select *pSelect = pTab->u.view.pSelect; in renameTableFunc() local
1908 Select *pSelect = sParse.pNewTable->u.view.pSelect; in renameQuotefixFunc() local
[all …]
H A Dwalker.c80 if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort; in walkExpr()
172 if( pItem->pSelect && sqlite3WalkSelect(pWalker, pItem->pSelect) ){ in sqlite3WalkSelectFrom()
225 int sqlite3WalkerDepthIncrease(Walker *pWalker, Select *pSelect){ in sqlite3WalkerDepthIncrease() argument
226 UNUSED_PARAMETER(pSelect); in sqlite3WalkerDepthIncrease()
230 void sqlite3WalkerDepthDecrease(Walker *pWalker, Select *pSelect){ in sqlite3WalkerDepthDecrease() argument
231 UNUSED_PARAMETER(pSelect); in sqlite3WalkerDepthDecrease()
H A Dinsert.c741 if( pSelect && (pSelect->selFlags & SF_Values)!=0 && pSelect->pPrior==0 ){ in sqlite3Insert()
743 pSelect->pEList = 0; in sqlite3Insert()
745 pSelect = 0; in sqlite3Insert()
819 && pSelect!=0 in sqlite3Insert()
909 if( pSelect ){ in sqlite3Insert()
1108 }else if( pSelect ){ in sqlite3Insert()
1199 }else if( pSelect ){ in sqlite3Insert()
1392 }else if( pSelect ){ in sqlite3Insert()
2803 assert( pSelect!=0 ); in xferOptimization()
2823 if( pSelect->pSrc->a[0].pSelect ){ in xferOptimization()
[all …]
H A Dselect.c669 Select *pSelect, in makeSorterRecord() argument
731 assert( pSelect->iOffset==0 || pSelect->iLimit!=0 ); in pushOntoSorter()
732 iLimit = pSelect->iOffset ? pSelect->iOffset+1 : pSelect->iLimit; in pushOntoSorter()
2093 while( pSelect->pPrior ) pSelect = pSelect->pPrior; in sqlite3GenerateColumnNames()
2294 assert( pSelect!=0 ); in sqlite3SelectAddColumnTypeAndCollation()
2300 a = pSelect->pEList->a; in sqlite3SelectAddColumnTypeAndCollation()
2346 while( pSelect->pPrior ) pSelect = pSelect->pPrior; in sqlite3ResultSetOfSelect()
4415 pSubitem->pSelect = 0; in flattenSubquery()
5518 pFrom->pSelect = sqlite3SelectDup(db, pCte->pSelect, 0); in resolveFromTermToCte()
5816 pFrom->pSelect = sqlite3SelectDup(db, pTab->u.view.pSelect, 0); in selectExpander()
[all …]
H A Dtrigger.c26 sqlite3SelectDelete(db, pTmp->pSelect); in sqlite3DeleteTriggerStep()
437 sqlite3SelectDelete(db, pSelect); in sqlite3TriggerSelectStep()
441 pTriggerStep->pSelect = pSelect; in sqlite3TriggerSelectStep()
499 assert(pSelect != 0 || db->mallocFailed); in sqlite3TriggerInsertStep()
504 pTriggerStep->pSelect = pSelect; in sqlite3TriggerInsertStep()
505 pSelect = 0; in sqlite3TriggerInsertStep()
507 pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE); in sqlite3TriggerInsertStep()
521 sqlite3SelectDelete(db, pSelect); in sqlite3TriggerInsertStep()
1099 Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0); in codeTriggerProgram() local
1101 sqlite3Select(pParse, pSelect, &sDest); in codeTriggerProgram()
[all …]
H A Dattach.c457 static int fixSelectCb(Walker *p, Select *pSelect){ in fixSelectCb() argument
463 SrcList *pList = pSelect->pSrc; in fixSelectCb()
490 if( pSelect->pWith ){ in fixSelectCb()
491 for(i=0; i<pSelect->pWith->nCte; i++){ in fixSelectCb()
492 if( sqlite3WalkSelect(p, pSelect->pWith->a[i].pSelect) ){ in fixSelectCb()
558 Select *pSelect /* The SELECT statement to be fixed to one database */ in sqlite3FixSelect() argument
560 return sqlite3WalkSelect(&pFix->w, pSelect); in sqlite3FixSelect()
576 if( sqlite3WalkSelect(&pFix->w, pStep->pSelect) in sqlite3FixTriggerStep()
H A Dexpr.c971 pExpr->x.pSelect = pSelect; in sqlite3PExprAddSelect()
1479 pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, dupFlags); in exprDup()
1534 pRet->a[i].pSelect = sqlite3SelectDup(db, p->a[i].pSelect, 0); in sqlite3WithDup()
1556 Select *pSelect = pWalker->u.pSelect; in gatherSelectWindowsCallback() local
1574 w.u.pSelect = p; in gatherSelectWindows()
1690 pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags); in sqlite3SrcListDup()
2590 p = pX->x.pSelect; in isCandidateForInOpt()
2969 Select *pSelect = ExprUseXSelect(pExpr) ? pExpr->x.pSelect : 0; in exprINAffinity() local
2979 if( pSelect ){ in exprINAffinity()
3131 Select *pSelect = pExpr->x.pSelect; in sqlite3CodeRhsOfIN() local
[all …]
H A Dtreeview.c175 sqlite3TreeViewSelect(pView, pCte->pSelect, 0); in sqlite3TreeViewWith()
224 if( pItem->pSelect ) n++; in sqlite3TreeViewSrcList()
230 if( pItem->pSelect ){ in sqlite3TreeViewSrcList()
236 sqlite3TreeViewSelect(pView, pItem->pSelect, (--n)>0); in sqlite3TreeViewSrcList()
713 sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0); in sqlite3TreeViewExpr()
719 sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0); in sqlite3TreeViewExpr()
736 sqlite3TreeViewSelect(pView, pExpr->x.pSelect, 0); in sqlite3TreeViewExpr()
1067 const Select *pSelect, in sqlite3TreeViewInsert() argument
1088 if( pSelect ) n++; in sqlite3TreeViewInsert()
1106 if( pSelect ){ in sqlite3TreeViewInsert()
[all …]
H A Dbuild.c2627 if( pEnd==0 && pSelect==0 ){ in sqlite3EndTable()
2813 if( pSelect ){ in sqlite3EndTable()
2863 if( pSelect ){ in sqlite3EndTable()
3003 pSelect->selFlags |= SF_View; in sqlite3CreateView()
3005 p->u.view.pSelect = pSelect; in sqlite3CreateView()
3006 pSelect = 0; in sqlite3CreateView()
3008 p->u.view.pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE); in sqlite3CreateView()
4894 if( pItem->pSelect ){ in sqlite3SrcListAssignCursors()
4916 if( pItem->pSelect ) sqlite3SelectDelete(db, pItem->pSelect); in sqlite3SrcListDelete()
4976 pItem->pSelect = pSubquery; in sqlite3SrcListAppendFromTerm()
[all …]
H A Dfkey.c693 sqlite3SelectDelete(dbMem, pStep->pSelect); in fkTriggerDelete()
1233 Select *pSelect = 0; /* If RESTRICT, "SELECT RAISE(...)" */ in fkActionTrigger() local
1333 pSelect = sqlite3SelectNew(pParse, in fkActionTrigger()
1357 pStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE); in fkActionTrigger()
1370 sqlite3SelectDelete(db, pSelect); in fkActionTrigger()
H A Dwherecode.c485 Select *pSelect; /* Pointer to the SELECT on the RHS */ in removeUnindexableInClauseTerms() local
488 pOrigRhs = pNew->x.pSelect->pEList; in removeUnindexableInClauseTerms()
508 pNew->x.pSelect->pEList = pRhs; in removeUnindexableInClauseTerms()
518 pSelect = pNew->x.pSelect; in removeUnindexableInClauseTerms()
519 if( pSelect->pOrderBy ){ in removeUnindexableInClauseTerms()
527 ExprList *pOrderBy = pSelect->pOrderBy; in removeUnindexableInClauseTerms()
611 if( !ExprUseXSelect(pX) || pX->x.pSelect->pEList->nExpr==1 ){ in codeEqualityTerm()
1441 assert( pWInfo->pSelect!=0 ); in sqlite3WhereCodeOneLoopStart()
1442 assert( pWInfo->pSelect->iOffset>0 ); in sqlite3WhereCodeOneLoopStart()
1443 sqlite3VdbeAddOp2(v, OP_Integer, 0, pWInfo->pSelect->iOffset); in sqlite3WhereCodeOneLoopStart()
[all …]
H A Dupdate.c199 Select *pSelect = 0; in updateFromSelect() local
265 pSelect = sqlite3SelectNew(pParse, pList, in updateFromSelect()
268 if( pSelect ) pSelect->selFlags |= SF_OrderByReqd; in updateFromSelect()
271 sqlite3Select(pParse, pSelect, &dest); in updateFromSelect()
272 sqlite3SelectDelete(db, pSelect); in updateFromSelect()
H A Dparse.y539 static Select *attachWithToSelect(Parse *pParse, Select *pSelect, With *pWith){
540 if( pSelect ){
541 pSelect->pWith = pWith;
542 parserDoubleLinkSelect(pParse, pSelect);
546 return pSelect;
723 pNew->pSelect = pOld->pSelect;
724 if( pNew->pSelect && (pNew->pSelect->selFlags & SF_NestedFrom)!=0 ){
734 pOld->pSelect = 0;
1335 Select *pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0);
1336 if( E ) sqlite3SrcListFuncArgs(pParse, pSelect ? pSrc : 0, E);
[all …]
H A Dwindow.c830 static int selectWindowRewriteSelectCb(Walker *pWalker, Select *pSelect){ in selectWindowRewriteSelectCb() argument
833 if( pSave==pSelect ){ in selectWindowRewriteSelectCb()
836 p->pSubSelect = pSelect; in selectWindowRewriteSelectCb()
837 sqlite3WalkSelect(pWalker, pSelect); in selectWindowRewriteSelectCb()
1081 p->pSrc->a[0].pSelect = pSub; in sqlite3WindowRewrite()
1388 void sqlite3WindowCodeInit(Parse *pParse, Select *pSelect){ in sqlite3WindowCodeInit() argument
1389 int nEphExpr = pSelect->pSrc->a[0].pSelect->pEList->nExpr; in sqlite3WindowCodeInit()
1390 Window *pMWin = pSelect->pWin; in sqlite3WindowCodeInit()
H A Ddelete.c190 Select *pSelect = NULL; /* Complete SELECT tree */ in sqlite3LimitWhere() local
258 pSelect = sqlite3SelectNew(pParse, pEList, pSelectSrc, pWhere, 0 ,0, in sqlite3LimitWhere()
264 sqlite3PExprAddSelect(pParse, pInClause, pSelect); in sqlite3LimitWhere()
H A Dwhereexpr.c948 mask |= exprSelectUsage(pMaskSet, pSrc->a[i].pSelect); in exprSelectUsage()
1085 pTerm->prereqRight = exprSelectUsage(pMaskSet, pExpr->x.pSelect); in exprAnalyze()
1435 && pExpr->x.pSelect->pPrior==0 in exprAnalyze()
1437 && pExpr->x.pSelect->pWin==0 in exprAnalyze()
1745 mask |= exprSelectUsage(pMaskSet, p->x.pSelect); in sqlite3WhereExprUsageFull()
/sqlite-3.40.0/ext/misc/
H A Ddbdump.c551 sqlite3_stmt *pSelect; in output_sql_from_query() local
566 rc = sqlite3_prepare_v2(p->db, zSql, -1, &pSelect, 0); in output_sql_from_query()
568 if( rc!=SQLITE_OK || !pSelect ){ in output_sql_from_query()
574 rc = sqlite3_step(pSelect); in output_sql_from_query()
575 nResult = sqlite3_column_count(pSelect); in output_sql_from_query()
577 z = (const char*)sqlite3_column_text(pSelect, 0); in output_sql_from_query()
581 p->xCallback((const char*)sqlite3_column_text(pSelect,i), p->pArg); in output_sql_from_query()
590 rc = sqlite3_step(pSelect); in output_sql_from_query()
592 rc = sqlite3_finalize(pSelect); in output_sql_from_query()
/sqlite-3.40.0/ext/fts3/
H A Dfts3_write.c1072 sqlite3_stmt *pSelect; in fts3DeleteTerms() local
1092 sqlite3_reset(pSelect); in fts3DeleteTerms()
1098 rc = sqlite3_reset(pSelect); in fts3DeleteTerms()
1100 sqlite3_reset(pSelect); in fts3DeleteTerms()
4282 sqlite3_reset(pSelect); in fts3IncrmergeLoad()
4286 return sqlite3_reset(pSelect); in fts3IncrmergeLoad()
4321 sqlite3_reset(pSelect); in fts3IncrmergeLoad()
4382 rc2 = sqlite3_reset(pSelect); in fts3IncrmergeLoad()
4561 rc2 = sqlite3_reset(pSelect); in fts3RepackSegdirLevel()
4827 sqlite3_stmt *pSelect = 0; in fts3IncrmergeHintLoad() local
[all …]
H A Dfts3_snippet.c1239 sqlite3_stmt *pSelect = 0; in fts3MatchinfoValues() local
1255 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, 0, 0); in fts3MatchinfoValues()
1266 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, &a, &pEnd); in fts3MatchinfoValues()
1328 rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc,0,0); in fts3MatchinfoValues()
1343 sqlite3_reset(pSelect); in fts3MatchinfoValues()
/sqlite-3.40.0/ext/recover/
H A Dsqlite3recover.c1144 sqlite3_stmt *pSelect = 0; in recoverWriteSchema1() local
1147 pSelect = recoverPrepare(p, p->dbOut, in recoverWriteSchema1()
1166 if( pSelect ){ in recoverWriteSchema1()
1167 sqlite3_bind_int(pSelect, 1, p->bSlowIndexes); in recoverWriteSchema1()
1168 while( sqlite3_step(pSelect)==SQLITE_ROW ){ in recoverWriteSchema1()
1199 recoverFinalize(p, pSelect); in recoverWriteSchema1()
1219 sqlite3_stmt *pSelect = 0; in recoverWriteSchema2() local
1221 pSelect = recoverPrepare(p, p->dbOut, in recoverWriteSchema2()
1230 if( pSelect ){ in recoverWriteSchema2()
1231 while( sqlite3_step(pSelect)==SQLITE_ROW ){ in recoverWriteSchema2()
[all …]
/sqlite-3.40.0/ext/fts1/
H A Dfulltext.c1079 static int query_merge(fulltext_vtab *v, sqlite3_stmt **pSelect, in query_merge() argument
1091 rc = term_select_doclist(v, zTerm, -1, pSelect); in query_merge()
1098 sqlite3_column_blob(*pSelect, 0), in query_merge()
1099 sqlite3_column_bytes(*pSelect, 0)); in query_merge()
1103 rc = sqlite3_step(*pSelect); in query_merge()
1210 sqlite3_stmt *pSelect = NULL; in fulltext_query() local
1225 rc = query_merge(v, &pSelect, q.pTerm[i].zTerm, d, i - phrase_start, next); in fulltext_query()
1233 sqlite3_finalize(pSelect); in fulltext_query()
/sqlite-3.40.0/ext/rbu/
H A Dsqlite3rbu.c287 sqlite3_stmt *pSelect; /* Source data */ member
819 sqlite3_finalize(pIter->pSelect); in rbuObjIterClearStatements()
833 pIter->pSelect = 0; in rbuObjIterClearStatements()
3288 switch( sqlite3_column_type(p->objiter.pSelect, iCol) ){ in rbuStepType()
3290 int iVal = sqlite3_column_int(p->objiter.pSelect, iCol); in rbuStepType()
3372 && sqlite3_column_type(pIter->pSelect, i)==SQLITE_NULL in rbuStepOneOp()
3383 pVal = sqlite3_column_value(pIter->pSelect, i); in rbuStepOneOp()
3399 assertColumnName(pIter->pSelect, pIter->nCol+1, in rbuStepOneOp()
3458 pVal = sqlite3_column_value(pIter->pSelect, i); in rbuStep()
3682 int rc = sqlite3_step(pIter->pSelect); in sqlite3rbu_step()
[all …]
/sqlite-3.40.0/ext/session/
H A Dsqlite3session.c2468 rc = sqlite3_bind_int64(pSelect, i+1, iVal); in sessionSelectBind()
4189 nCol, abPK, pSelect in sessionSeekToRow()
4193 rc = sqlite3_step(pSelect); in sessionSeekToRow()
4194 if( rc!=SQLITE_ROW ) rc = sqlite3_reset(pSelect); in sessionSeekToRow()
4313 pIter->pConflict = p->pSelect; in sessionConflictHandler()
4316 rc = sqlite3_reset(p->pSelect); in sessionConflictHandler()
4395 assert( p->pDelete && p->pInsert && p->pSelect ); in sessionApplyOneOp()
4483 sqlite3_reset(p->pSelect); in sessionApplyOneOp()
4683 sqlite3_finalize(sApply.pSelect); in sessionChangesetApply()
4687 sApply.pSelect = 0; in sessionChangesetApply()
[all …]

12