1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-11-08 03:22:21 +03:00

Added support for the INTEGER PRIMARY KEY column type. (CVS 333)

FossilOrigin-Name: 236a54d289e858a1e0505a20d907a2a40c01b521
This commit is contained in:
drh
2001-12-21 14:30:42 +00:00
parent 7c917d196f
commit 4a32431ce7
14 changed files with 432 additions and 112 deletions

View File

@@ -12,7 +12,7 @@
** This file contains routines used for analyzing expressions and
** for generating VDBE code that evaluates expressions in SQLite.
**
** $Id: expr.c,v 1.34 2001/11/24 00:31:46 drh Exp $
** $Id: expr.c,v 1.35 2001/12/21 14:30:43 drh Exp $
*/
#include "sqliteInt.h"
@@ -127,7 +127,12 @@ int sqliteExprResolveIds(Parse *pParse, IdList *pTabList, Expr *pExpr){
if( sqliteStrICmp(pTab->aCol[j].zName, z)==0 ){
cnt++;
pExpr->iTable = i + pParse->nTab;
pExpr->iColumn = j;
if( j==pTab->iPKey ){
/* Substitute the record number for the INTEGER PRIMARY KEY */
pExpr->iColumn = -1;
}else{
pExpr->iColumn = j;
}
}
}
}
@@ -190,7 +195,12 @@ int sqliteExprResolveIds(Parse *pParse, IdList *pTabList, Expr *pExpr){
if( sqliteStrICmp(pTab->aCol[j].zName, zRight)==0 ){
cnt++;
pExpr->iTable = i + pParse->nTab;
pExpr->iColumn = j;
if( j==pTab->iPKey ){
/* Substitute the record number for the INTEGER PRIMARY KEY */
pExpr->iColumn = -1;
}else{
pExpr->iColumn = j;
}
}
}
}