• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/Heimdal-398.1.2/lib/sqlite/

Lines Matching refs:rowid

2130 ** integer key called the [ROWID | "rowid"]. ^The rowid is always available
2134 ** is another alias for the rowid.
2136 ** ^This routine returns the [rowid] of the most recent
2139 ** records the last insert rowid of both ordinary tables and [virtual tables].
2144 ** method, then this routine will return the [rowid] of the inserted
2168 ** function is running and thus changes the last insert [rowid],
2171 ** last insert [rowid].
4983 ** ^The final callback parameter is the [rowid] of the row.
4984 ** ^In the case of an update, this is the [rowid] after the update takes place.
5163 ** ^If the specified column is "rowid", "oid" or "_rowid_" and an
5597 ** SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
5660 ** by the rowid value passed as the second argument. Only the row can be
9424 ** The sqlite.lastRowid records the last insert rowid generated by an
9904 ** be set. An INTEGER PRIMARY KEY is used as the rowid for each row of
9905 ** the table. If a table has no INTEGER PRIMARY KEY, then a random rowid
10082 i64 rowid; /* Used by UNPACKED_PREFIX_SEARCH */
10091 #define UNPACKED_IGNORE_ROWID 0x0004 /* Ignore trailing rowid on key1 */
10320 ynVar iColumn; /* TK_COLUMN: column index. -1 for rowid.
10737 #define SRT_Table 8 /* Store result as data with an automatic rowid */
10767 int regCtr; /* Memory register holding the rowid counter */
10870 int regRowid; /* Register holding rowid of CREATE TABLE entry */
12611 i64 lastRowid; /* Last rowid from a Next or NextIdx operation */
12669 i64 lastRowid; /* Last insert rowid (sqlite3.lastRowid) */
37005 ** can be intermixed with tests to see if a given rowid has been
37154 SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){
37171 pEntry->v = rowid;
37175 if( p->isSorted && rowid<=pLast->v ){
47832 sqlite3_int64 cachedRowid; /* Next rowid cache. 0 means not valid */
48724 ** rowid iRow is being replaced or deleted. In this case invalidate
48729 i64 iRow, /* The rowid that might be changing */
51794 ** Set the cached rowid value of every cursor in the same database file
51798 ** Only positive rowid values are considered valid for this cache.
51814 ** Return the cached rowid for the given cursor. A negative or zero
51815 ** return value indicates that the rowid cache is invalid and should be
51816 ** ignored. If the rowid cache has never before been set, then a
55199 ** BTREE_INTKEY|BTREE_LEAFDATA Used for SQL tables with rowid keys
61238 ** an index key, and thus ends with a rowid value. The last byte
61239 ** of the header will therefore be the serial type of the rowid:
61241 ** The serial type of the final rowid will always be a single byte.
61243 ** to ignore the rowid at the end of key1.
61304 ** rowid field were equal, then clear the PREFIX_SEARCH flag and set
61305 ** pPKey2->rowid to the value of the rowid field in (pKey1, nKey1).
61312 pPKey2->rowid = mem1.u.i;
61348 ** Read the rowid (the last field in the record) and store it in *rowid.
61354 SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
61358 u32 typeRowid; /* Serial type of the rowid */
61359 u32 lenRowid; /* Size of the rowid */
61411 *rowid = v.u.i;
61429 ** pUnpacked is either created without a rowid or is truncated so that it
61430 ** omits the rowid at the end. The rowid at the end of the index entry
61432 ** of the keys prior to the final rowid, not the entire key.
63851 i64 iKey; /* The rowid we are to seek to */
63881 i64 v; /* The new rowid */
63882 VdbeCursor *pC; /* Cursor of table to get the new rowid */
63885 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
63954 i64 rowid;
64083 sqlite_int64 rowid;
66919 i64 iKey; /* The rowid we are to seek to */
67065 ** P1 is an open table cursor and P2 is a rowid integer. Arrange
67066 ** for P1 to move so that it points to the rowid given by P2.
67189 ** The value of N can be inferred from the cursor. N includes the rowid
67190 ** value appended to the end of the index record. This rowid value may
67197 ** where the first (N-1) fields match but the rowid value at the end
67199 ** to instruction P2. Otherwise, the rowid of the conflicting index
67256 ** to P2. Otherwise, copy the rowid of the conflicting record to
67259 if( (u.bd.r.flags & UNPACKED_PREFIX_SEARCH) || u.bd.r.rowid==u.bd.R ){
67262 pIn3->u.i = u.bd.r.rowid;
67340 ** Get a new integer record number (a.k.a "rowid") used as the key to a table.
67354 i64 v; /* The new rowid */
67355 VdbeCursor *pC; /* Cursor of table to get the new rowid */
67358 Mem *pMem; /* Register holding largest rowid for AUTOINCREMENT */
67370 /* The next rowid or record number (different terms for the same
67373 ** First we attempt to find the largest existing rowid and add one
67374 ** to that. But if the largest existing rowid is already the maximum
67378 ** The second algorithm is to select a rowid at random and see if
67380 ** succeeded. If the random rowid does exist, we select a new one
67454 assert( pOp->p3==0 ); /* We cannot be in random rowid mode if this is
67465 /* collision - try another random rowid */
67499 ** then rowid is stored for subsequent return by the
67635 /* If the update-hook will be invoked, set u.bh.iKey to the rowid of the
67686 ** If, excluding the rowid fields at the end, the two records are a match,
68148 ** the rowid of the table entry to which this index entry points.
68156 i64 rowid;
68170 rc = sqlite3VdbeIdxRowid(db, u.bs.pCrsr, &u.bs.rowid);
68174 pOut->u.i = u.bs.rowid;
68428 "SELECT name, rootpage, sql FROM '%q'.%s WHERE %s ORDER BY rowid",
69558 ** is the rowid of a row to delete. If argv[0] is NULL then no
69559 ** deletion occurs. The argv[1] element is the rowid of the new
69561 ** rowid for itself. The subsequent elements in the array are
69564 ** If P2==1 then no insert is performed. argv[0] is the rowid of
69569 ** is set to the value of the rowid for the row just inserted.
69577 sqlite_int64 rowid;
69601 rc = u.cp.pModule->xUpdate(u.cp.pVtab, u.cp.nArg, u.cp.apArg, &u.cp.rowid);
69606 db->lastRowid = lastRowid = u.cp.rowid;
69898 zErr = sqlite3MPrintf(p->db, "no such rowid: %lld", iRow);
69951 {OP_Variable, 1, 1, 1}, /* 5: Push the rowid to the stack */
70574 ** If the bOmitRowid argument is non-zero, assume both keys end in a rowid
70584 int bOmitRowid, /* Ignore rowid field at end of keys */
71139 ** the comparison, ignore the rowid field at the end of each record.
71998 /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
72262 /* The special operator TK_ROW means use the rowid for the first
72927 ** Expr.iColumn The column index in X.Y. -1 for the rowid.
74570 ** to be of the form "<rowid> IN (?, ?, ?)", where <rowid> is a reference
74595 int isRowid /* If true, LHS of IN operator is a rowid */
75170 ** is called. If iColumn<0 then code is generated that extracts the rowid.
75710 ** read the rowid field.
75713 ** parameter is set to 0 for an old.rowid reference, or to (i+1)
75715 ** i is the index of the column. For a new.rowid reference, p1 is
75726 ** p1==0 -> old.rowid p1==3 -> new.rowid
75741 (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
80029 ** The rowid for the new entry is left in register pParse->regRowid.
80031 ** The rowid and root page number values are needed by the code that
80263 ** then we will try to use that column as the rowid. Set the Table.iPKey
80729 "WHERE rowid=#%d",
83538 Expr *pWhereRowid = NULL; /* WHERE rowid .. */
83539 Expr *pInClause = NULL; /* WHERE rowid IN ( select ) */
83540 Expr *pSelectRowid = NULL; /* SELECT rowid ... */
83542 SrcList *pSelectSrc = NULL; /* SELECT rowid FROM x ... (dup of pSrc) */
83566 ** DELETE FROM table_a WHERE rowid IN (
83567 ** SELECT rowid FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1
83589 /* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */
83766 int iRowid = ++pParse->nMem; /* Used for storing rowid values. */
83827 ** maximum rowid counter values recorded while inserting into
83883 int iRowid, /* Memory cell that contains the rowid to delete */
83908 ** avoid copying the contents of the rowid register. */
86195 ** row being deleted from the scan by adding ($rowid != rowid) to the WHERE
86196 ** clause, where $rowid is the rowid of the row being deleted. */
86342 ** rowid of the row being deleted, followed by each of the column values
86548 ** UPDATE statement modifies the rowid fields of the table.
86558 int chngRowid /* True for UPDATE that affects rowid */
86931 ** rowid that appears as the last column in every index.
87054 ** that holds the maximum rowid.
87066 ** (3) Register to hold the rowid in sqlite_sequence of pTab
87076 int memId = 0; /* Register holding maximum rowid */
87091 pInfo->regCtr = ++pToplevel->nMem; /* Max rowid register */
87107 int memId; /* Register holding max rowid */
87138 ** Update the maximum rowid for an autoincrement calculation.
87141 ** new rowid that is about to be inserted. If that new rowid is
87142 ** larger than the maximum rowid in the memId memory cell, then the
87153 ** maximum rowid values back into the sqlite_sequence register.
87347 int regIns; /* Block of regs holding rowid+data being inserted */
87348 int regRowid; /* registers holding insert rowid */
87675 /* Allocate registers for holding the rowid of the new row,
87696 ** not happened yet) so we substitute a rowid of -1
87903 ** maximum rowid counter values recorded while inserting into
87948 ** 1. The rowid of the row after the update.
87959 ** the address of a register containing the rowid before the update takes
87962 ** indicates that the rowid was explicitly specified as part of the
87963 ** INSERT statement. If rowidChng is false, it means that the rowid is
87964 ** computed automatically in an insert or that the rowid value is not
88024 int rowidChng, /* True if the rowid might collide with existing entry */
88157 ** REPLACE INTO t(rowid) VALUES($newrowid)
88299 ** rowid and the content to be inserted.
88508 int regData, regRowid; /* Registers holding data and rowid */
91140 sqlite3VdbeChangeP4(v, addr+1, "rowid ", P4_STATIC);
91805 "SELECT name, rootpage, sql FROM '%q'.%s ORDER BY rowid",
93412 ** rowid of the sub-select or view. This expression is legal (see
93429 zOriginCol = "rowid";
93555 zCol = "rowid";
93627 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
98143 ** reg+0 OLD.rowid
98147 ** reg+N+1 NEW.rowid
98216 ** It is not possible to determine if the old.rowid or new.rowid column is
98283 Expr *pRowidExpr, /* Expression used to recompute the rowid */
98386 int regOldRowid; /* The old rowid */
98387 int regNewRowid; /* The new rowid */
98579 /* Remember the rowid of every item to be updated.
98798 ** maximum rowid counter values recorded while inserting into
98842 ** (A) The original rowid of that row.
98843 ** (B) The revised rowid for the row. (note1)
98860 Expr *pRowid, /* Expression used to recompute the rowid */
99642 ** The VM register number pParse->regRowid holds the rowid of an
99650 "WHERE rowid=#%d",
100582 #define WHERE_ROWID_EQ 0x00001000 /* rowid=EXPR or rowid IN (...) */
100583 #define WHERE_ROWID_RANGE 0x00002000 /* rowid<EXPR and/or rowid>EXPR */
101955 ** represent the rowid index that is part of every table. */
101962 ** one additional column containing the rowid. The rowid column
101970 int iColumn; /* The i-th column of the index. -1 for rowid */
102004 /* Index column i is the rowid. All other terms match. */
103204 ** selected plan may still take advantage of the built-in rowid primary key
103249 ** variable sPk to represent the rowid primary key index. Make this
103338 ** This is always false for the rowid primary key index of a table.
103523 ** + nRow table searches to lookup the table entry using the rowid
103534 /* For a rowid primary key lookup:
104085 zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid=?)", zMsg);
104087 zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid>? AND rowid<?)", zMsg);
104089 zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid>?)", zMsg);
104091 zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid<?)", zMsg);
104222 ** we reference multiple rows using a "rowid IN (...)"
104575 ** RowSetTest are such that the rowid of the current row is inserted
104580 ** RowSetTest # Insert rowid into rowset
104602 int regRowid = 0; /* Register holding rowid */
105109 ** SELECT * FROM t2, t1 WHERE t2.rowid = t1.a;
112731 ** 1. The specified column name was rowid", "oid" or "_rowid_"
114285 #define FTS3_DOCID_SEARCH 1 /* Lookup by rowid on %_content table */
115432 ** 1. Direct lookup by rowid or docid.
115451 /* A direct lookup on the rowid or docid column. Assign a cost of 1.0. */
115464 ** rowid/docid lookup, prefer the MATCH strategy. This is done even
115465 ** though the rowid/docid lookup is faster than a MATCH query, selecting
115484 /* Regardless of the strategy selected, FTS can deliver rows in rowid (or
116963 ** retrieve the rowid for the current row of the result set. fts3
116964 ** exposes %_content.docid as the rowid for the virtual table. The
116965 ** rowid should be written to *pRowid.
116991 ** alias for "rowid", use the xRowid() method to obtain the value.
117019 sqlite_int64 *pRowid /* OUT: The affected (or effected) rowid */
119097 sqlite3_int64 iRowid; /* Current rowid */
119305 /* Increment our pretend rowid value. */
119489 ** xRowid - Return the current rowid for the cursor.
122511 /* 0 */ "DELETE FROM %Q.'%q_content' WHERE rowid = ?",
122512 /* 1 */ "SELECT NOT EXISTS(SELECT docid FROM %Q.'%q_content' WHERE rowid!=?)",
122518 /* 7 */ "SELECT %s FROM %Q.'%q_content' AS x WHERE rowid=?",
123027 ** apVal[1] rowid
123032 ** apVal[p->nColumn+3] Hidden "docid" column (alias for rowid)
123056 ** a value for the "rowid" field, for the "docid" field, or for both.
123057 ** Which is a problem, since "rowid" and "docid" are aliases for the
123060 ** INSERT INTO fts3tbl(rowid, docid) VALUES(1, 2);
123063 ** for both docid and some other rowid alias.
123069 /* A rowid/docid conflict. */
125344 ** SQLite value pRowid contains the rowid of a row that may or may not be
125386 sqlite_int64 *pRowid /* OUT: The affected (or effected) rowid */
125420 /* If this is an INSERT operation, or an UPDATE that modifies the rowid
125430 /* Find the value object that holds the new rowid value. */
125440 /* The new rowid is not NULL (in this case the rowid will be
125443 ** rowid column. So if the conflict mode is REPLACE, then delete any
125444 ** existing row with rowid=pNewRowid.
125447 ** the %_content table. If we hit the duplicate rowid constraint (or any
127058 ** CREATE TABLE %_rowid(rowid INTEGER PRIMARY KEY, nodeno INTEGER)
127064 ** table that maps from the entries rowid to the id of the node that it
127081 ** of 4-byte coordinates. For leaf nodes the integer is the rowid
127229 ** supported cell size is 48 bytes (8 byte rowid + ten 4 byte coordinates).
127690 ** node pNode. If pNode is a leaf node, this is a rowid. If it is
128125 /* This "scan" is a direct lookup by rowid. There is no next entry. */
128194 ** rowid iRowid. If successful, set *ppLeaf to point to the node and
128280 /* Special case - lookup by rowid. */
128356 ** 1 Unused Direct lookup by rowid.
128397 /* We have an equality constraint on the rowid. Use strategy 1. */
128407 /* This strategy involves a two rowid lookups on an B-Tree structures
128409 ** considered almost as quick as a direct rowid lookup (for which
129333 ** rowid of the row to delete, which can be used to find the leaf on which
129645 ** Select a currently unused rowid for a new r-tree record.
129658 ** Remove the entry with rowid=iDelete from the r-tree structure.
129753 int bHaveRowid = 0; /* Set to 1 after new rowid is determined */
129761 ** 1. A duplicate rowid value, or
129794 /* If a rowid value was supplied, check if it is already present in
129818 /* If azData[0] is not an SQL NULL value, it is the rowid of a
129834 /* Figure out the rowid of the new row. */
129923 "SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = :1",
129925 "DELETE FROM '%q'.'%q_rowid' WHERE rowid = :1",
129940 "CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY, nodeno INTEGER);"
130155 ** list, containing the 8-byte rowid/pageno followed by the