insert.c File Reference

Go to the source code of this file.

Functions

void sqlite3IndexAffinityStr (Vdbe *v, Index *pIdx)
void sqlite3TableAffinityStr (Vdbe *v, Table *pTab)
static int readsTable (Vdbe *v, int iStartAddr, int iDb, Table *pTab)
static int autoIncBegin (Parse *pParse, int iDb, Table *pTab)
static void autoIncStep (Parse *pParse, int memId, int regRowid)
static void autoIncEnd (Parse *pParse, int iDb, Table *pTab, int memId)
static int xferOptimization (Parse *pParse, Table *pDest, Select *pSelect, int onError, int iDbDest)
void sqlite3Insert (Parse *pParse, SrcList *pTabList, ExprList *pList, Select *pSelect, IdList *pColumn, int onError)
void sqlite3GenerateConstraintChecks (Parse *pParse, Table *pTab, int baseCur, int regRowid, int *aRegIdx, int rowidChng, int isUpdate, int overrideError, int ignoreDest)
void sqlite3CompleteInsertion (Parse *pParse, Table *pTab, int baseCur, int regRowid, int *aRegIdx, int rowidChng, int isUpdate, int newIdx, int appendBias)
int sqlite3OpenTableAndIndices (Parse *pParse, Table *pTab, int baseCur, int op)
static int xferCompatibleCollation (const char *z1, const char *z2)
static int xferCompatibleIndex (Index *pDest, Index *pSrc)

Function Documentation

static int autoIncBegin ( Parse pParse,
int  iDb,
Table pTab 
) [static]
static void autoIncEnd ( Parse pParse,
int  iDb,
Table pTab,
int  memId 
) [static]
static void autoIncStep ( Parse pParse,
int  memId,
int  regRowid 
) [static]

Definition at line 202 of file insert.c.

References OP_MemMax, Parse::pVdbe, and sqlite3VdbeAddOp2().

Referenced by sqlite3Insert(), and xferOptimization().

static int readsTable ( Vdbe v,
int  iStartAddr,
int  iDb,
Table pTab 
) [static]
void sqlite3CompleteInsertion ( Parse pParse,
Table pTab,
int  baseCur,
int  regRowid,
int *  aRegIdx,
int  rowidChng,
int  isUpdate,
int  newIdx,
int  appendBias 
)
void sqlite3GenerateConstraintChecks ( Parse pParse,
Table pTab,
int  baseCur,
int  regRowid,
int *  aRegIdx,
int  rowidChng,
int  isUpdate,
int  overrideError,
int  ignoreDest 
)
void sqlite3IndexAffinityStr ( Vdbe v,
Index pIdx 
)
void sqlite3Insert ( Parse pParse,
SrcList pTabList,
ExprList pList,
Select pSelect,
IdList pColumn,
int  onError 
)

Definition at line 359 of file insert.c.

References IdList::a, ExprList::a, SrcList::a, Table::aCol, sqlite3::aDb, autoIncBegin(), autoIncEnd(), autoIncStep(), COLNAME_NAME, Parse::db, db, sqlite3::flags, IdList::IdList_item::idx, SelectDest::iMem, SelectDest::iParm, Table::iPKey, IsHiddenColumn, IsVirtual, sqlite3::mallocFailed, Table::nCol, Parse::nErr, Parse::nested, ExprList::nExpr, IdList::nId, SelectDest::nMem, Parse::nMem, SrcList::nSrc, Parse::nTab, OE_Abort, OP_AddImm, OP_Close, OP_Column, OP_Goto, OP_Halt, OP_If, OP_Insert, OP_Integer, OP_IsNull, OP_MakeRecord, OP_MustBeInt, OP_NewRowid, OP_Next, OP_NotNull, OP_Null, OP_OpenEphemeral, OP_OpenPseudo, OP_OpenWrite, OP_ResultRow, OP_Rewind, OP_SCopy, OP_SetNumColumns, OP_VUpdate, OP_Yield, VdbeOp::opcode, VdbeOp::p1, VdbeOp::p2, VdbeOp::p3, P4_VTAB, Column::pDflt, Select::pEList, ExprList::ExprList_item::pExpr, Table::pIndex, Index::pNext, NameContext::pParse, Table::pSchema, Table::pSelect, Table::pVtab, readsTable(), sqlite3AuthCheck(), sqlite3BeginWriteOperation(), sqlite3CodeRowTrigger(), sqlite3CompleteInsertion(), sqlite3DbFree(), sqlite3DbMallocRaw(), sqlite3ErrorMsg(), sqlite3ExprCode(), sqlite3ExprCodeAndCache(), sqlite3ExprListDelete(), sqlite3GenerateConstraintChecks(), sqlite3GetTempRange(), sqlite3GetTempReg(), sqlite3GetVdbe(), sqlite3IdListDelete(), sqlite3IsReadOnly(), sqlite3IsRowid(), sqlite3OpenTableAndIndices(), sqlite3ReleaseTempRange(), sqlite3ReleaseTempReg(), sqlite3ResolveExprNames(), sqlite3SchemaToIndex(), sqlite3Select(), sqlite3SelectDelete(), sqlite3SelectDestInit(), sqlite3SrcListDelete(), sqlite3SrcListLookup(), sqlite3StrICmp(), sqlite3TableAffinityStr(), sqlite3TriggersExist(), sqlite3VdbeAddOp1(), sqlite3VdbeAddOp2(), sqlite3VdbeAddOp3(), sqlite3VdbeAddOp4(), sqlite3VdbeCountChanges(), sqlite3VdbeCurrentAddr(), sqlite3VdbeGetOp(), sqlite3VdbeJumpHere(), sqlite3VdbeMakeLabel(), sqlite3VdbeResolveLabel(), sqlite3VdbeSetColName(), sqlite3VdbeSetNumCols(), sqlite3ViewGetColumnNames(), sqlite3VtabMakeWritable(), SQLITE_CountRows, SQLITE_INSERT, SQLITE_INTERNAL, SQLITE_STATIC, SRT_Coroutine, TK_INSERT, TRIGGER_AFTER, TRIGGER_BEFORE, Parse::trigStack, VdbeComment, xferOptimization(), Column::zName, IdList::IdList_item::zName, Table::zName, Db::zName, and SrcList::SrcList_item::zName.

Referenced by codeTriggerProgram(), and yy_reduce().

int sqlite3OpenTableAndIndices ( Parse pParse,
Table pTab,
int  baseCur,
int  op 
)
void sqlite3TableAffinityStr ( Vdbe v,
Table pTab 
)
static int xferCompatibleCollation ( const char *  z1,
const char *  z2 
) [static]

Definition at line 1430 of file insert.c.

References sqlite3StrICmp().

Referenced by xferOptimization().

static int xferCompatibleIndex ( Index pDest,
Index pSrc 
) [static]
static int xferOptimization ( Parse pParse,
Table pDest,
Select pSelect,
int  onError,
int  iDbDest 
) [static]

ContextLogger2—ContextLogger2 Logger Daemon Internals—Generated on Mon May 2 13:49:59 2011 by Doxygen 1.6.1