Lines Matching refs:INSERT
2690 ** only, that is DELETE, INSERT, SELECT, and UPDATE statements. The
2793 ** the most recent successful [INSERT] into a rowid table or [virtual table]
2795 ** recorded. ^If no successful [INSERT]s into rowid tables have ever occurred
2803 ** Some virtual table implementations may INSERT rows into rowid tables as
2806 ** associated with these internal INSERT operations, which leads to
2812 ** ^(If an [INSERT] occurs within a trigger then this routine will
2817 ** ^An [INSERT] that fails due to a constraint violation is not a
2818 ** successful [INSERT] and does not change the value returned by this
2819 ** routine. ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
2820 ** and INSERT OR ABORT make no changes to the return value of this
2821 ** routine when their insertion fails. ^(When INSERT OR REPLACE
2823 ** INSERT continues to completion after deleting rows that caused
2824 ** the constraint problem so INSERT OR REPLACE will always change
2827 ** ^For the purposes of this routine, an [INSERT] is considered to
2833 ** If a separate thread performs a new [INSERT] on the same
2857 ** deleted by the most recently completed INSERT, UPDATE or DELETE
2860 ** and that if the number of rows modified by the most recent INSERT, UPDATE
2865 ** ^Only changes made directly by the INSERT, UPDATE or DELETE statement are
2871 ** returned by sqlite3_changes() immediately after an INSERT, UPDATE or
2885 ** <li> ^(Within a trigger program each INSERT, UPDATE and DELETE
2893 ** by the first INSERT, UPDATE or DELETE statement within a trigger, it
2897 ** previous INSERT, UPDATE or DELETE statement within the same trigger.
2919 ** deleted by all [INSERT], [UPDATE] or [DELETE] statements completed
2976 ** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
9915 ** of a [virtual table] implementation for an INSERT or UPDATE operation. ^The
10404 ** that is invoked prior to each [INSERT], [UPDATE], and [DELETE] operation
10433 ** row being modified or deleted. For an INSERT operation on a rowid table,
10435 ** parameter is undefined. For an INSERT or UPDATE on a rowid table the
10494 int op, /* SQLITE_UPDATE, DELETE or INSERT */
11227 ** A changeset consists of zero or more INSERT, UPDATE and/or DELETE changes,
11228 ** each representing a change to a single row of an attached table. An INSERT
11235 ** is represented in a changeset as a DELETE followed by an INSERT.
11242 ** only an INSERT is appears in the changeset. Similarly, if an existing row
11289 ** for a row with a matching primary key. If one is found, an INSERT
11308 ** a DELETE and an INSERT.
11315 ** the same session object is disabled, no INSERT record will appear in the
11376 ** the from-table, an INSERT record is added to the session object.
11681 ** new row values stored as part of the UPDATE or INSERT change and
11782 ** <li> Each DELETE change is changed to an INSERT, and
11783 ** <li> Each INSERT change is changed to a DELETE, and
11916 ** <tr><td>INSERT <td>INSERT <td>
11920 ** <tr><td>INSERT <td>UPDATE <td>
11921 ** The INSERT change remains in the changegroup. The values in the
11922 ** INSERT change are modified as if the row was inserted by the
11924 ** <tr><td>INSERT <td>DELETE <td>
11925 ** The existing INSERT is removed from the changegroup. The DELETE is
11927 ** <tr><td>UPDATE <td>INSERT <td>
11938 ** <tr><td>DELETE <td>INSERT <td>
12039 ** to modify the table contents according to the UPDATE, INSERT or DELETE
12089 ** <dt>INSERT Changes<dd>
12090 ** For each INSERT change, an attempt is made to insert the new row into
12103 ** This includes the case where the INSERT operation is re-attempted because
12245 ** handler while processing an INSERT change if the operation would result
12331 ** INSERT of the same key on "CREATE TABLE t1(a PRIMARY KEY, b)":
12333 ** local: INSERT INTO t1 VALUES(1, 'v1');
12334 ** remote: INSERT INTO t1 VALUES(1, 'v2');
12336 ** and the conflict resolution is REPLACE, then the INSERT change is
12346 ** <dt>Local INSERT<dd>
12347 ** This may only conflict with a remote INSERT. If the conflict
12362 ** is changed into an INSERT. Any undefined values in the new.* record
13325 ** * Terms in the VALUES clause of an INSERT statement
17213 #define SQLITE_CountRows HI(0x00001) /* Count rows changed by INSERT, */
17798 ** special handling during INSERT processing. The "OOO" means "Out Of Order".
17952 #define OE_Ignore 4 /* Ignore the error. Do not do the INSERT or UPDATE */
17953 #define OE_Replace 5 /* Delete existing record, then do INSERT or UPDATE */
18540 ** INSERT INTO t(a,b,c) VALUES ...;
18545 ** column names after a table name in an INSERT statement. In the statement
18547 ** INSERT INTO t(a,b,c) ...
18646 ** represents the target tables for DELETE, INSERT, and UPDATE statements.
18706 ** to the table being operated on by INSERT, UPDATE, or DELETE. The
18796 ** information from the INSERT processing down into the UPDATE processing
18797 ** while generating code. The fields below are owned by the INSERT
18798 ** statement and will be freed by INSERT processing. */
19014 ** trigger that may be fired while parsing an INSERT, UPDATE or DELETE
19026 ** accessed (or set to 0 for triggers fired as a result of INSERT
19343 ** The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or
19352 ** pIdList -> If this is an INSERT INTO ... (<column-names>) VALUES ...
19382 Select *pSelect; /* SELECT statement or RHS of INSERT INTO SELECT ... */
19383 char *zTarget; /* Target table for DELETE, UPDATE, INSERT */
19387 IdList *pIdList; /* Column names for INSERT */
19388 Upsert *pUpsert; /* Upsert clauses on an INSERT */
32392 ** into generating an INSERT statement.
32406 const char *zLabel = "INSERT";
32409 case OE_Ignore: zLabel = "INSERT OR IGNORE"; break;
32410 case OE_Rollback: zLabel = "INSERT OR ROLLBACK"; break;
32411 case OE_Abort: zLabel = "INSERT OR ABORT"; break;
32412 case OE_Fail: zLabel = "INSERT OR FAIL"; break;
54844 ** INSERT
54850 ** obviously. The INSERT primitive adds a new element to the RowSet.
54854 ** The INSERT primitive might allocate additional memory. Memory is
54861 ** in the batch number. In other words, if an INSERT occurs between
54863 ** value added by the INSERT will not be visible to the second TEST.
54870 ** The cost of an INSERT is roughly constant. (Sometimes new memory
54871 ** has to be allocated on an INSERT.) The cost of a TEST with a new
75788 ** in exchange for a larger degradation in INSERT and UPDATE performance.
77797 TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
77887 ** happen while processing an "INSERT INTO ... SELECT" statement), it
84569 ** with no indexes using a single prepared INSERT statement, bind()
85844 /* If this was an INSERT, UPDATE or DELETE and no statement transaction
89952 /* For an INSERT, memory cell p->iNewReg contains the serialized record
91067 /*** INSERT STACK UNION HERE ***/
95881 ** is part of an INSERT operation. The difference is only important to
98629 ** The xUpdate method will do a DELETE or an INSERT or both.
118915 ** is attached to a DELETE, INSERT, or UPDATE, so construct it as a
120405 ** so that INSERT can find the table easily. */
121043 ** in the ON DELETE, ON UPDATE and ON INSERT clauses.
121896 "INSERT INTO %Q." LEGACY_SCHEMA_TABLE " VALUES('index',%Q,%Q,#%d,%Q);",
123717 ** the name of a single table, as one might find in an INSERT, DELETE,
123745 ** by a DELETE, INSERT, or UPDATE statement.
123779 ** * Do not allow DELETE, INSERT, or UPDATE of SQLITE_VTAB_DIRECTONLY
123781 ** * Only allow DELETE, INSERT, or UPDATE of non-SQLITE_VTAB_INNOCUOUS
127174 ** INSERT operations:
127216 ** and the statement transaction is rolled back. An exception is an INSERT
127219 ** INSERT violates a foreign key constraint. This is necessary as such
127220 ** an INSERT does not open a statement transaction.
127235 ** coding an INSERT operation. The functions used by the UPDATE/DELETE
127256 ** For the following INSERT statement:
127259 ** INSERT INTO t1 VALUES(1, 2, 3.1);
127433 ** INSERT immediate Increment the "immediate constraint counter".
127437 ** INSERT deferred Increment the "deferred constraint counter".
127500 ** to increment the constraint-counter (i.e. this is an INSERT operation),
127527 ** to increment the constraint-counter (i.e. this is an INSERT operation),
127568 /* Special case: If this is an INSERT statement that will insert exactly
127662 ** INSERT immediate Decrement the "immediate constraint counter".
127666 ** INSERT deferred Decrement the "deferred constraint counter".
128002 ** For an INSERT operation, regOld is passed zero and regNew is passed the
128009 ** but before the new record is inserted using the INSERT convention.
128615 ** to handle INSERT statements in SQLite.
128824 ** a statement of the form "INSERT INTO <iDb, pTab> SELECT ..." can
129125 ** Every statement that might do an INSERT into an autoincrement
129204 ** DEFAULT VALUES form of the INSERT statement is intended.
129218 ** INSERT INTO <table> SELECT ...
129307 SelectDest dest; /* Destination for SELECT on rhs of INSERT */
129413 ** INSERT INTO <table1> SELECT * FROM <table2>;
129447 /* If the INSERT statement included an IDLIST term, then make sure
129484 "cannot INSERT into generated column \"%s\"",
129576 /* This is the case if the data for the INSERT is coming from a
129769 /* Hidden columns that are not explicitly named in the INSERT
129790 /* This is INSERT INTO ... DEFAULT VALUES. Load the default value. */
129861 /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,
130178 ** Generate code to do constraint checks prior to an INSERT or an UPDATE
130191 ** for an INSERT. This routine can distinguish between UPDATE and INSERT by
130199 ** For an INSERT, the pkChng boolean indicates whether or not the rowid
130200 ** was explicitly specified as part of the INSERT statement. If pkChng
130202 ** that the table is a WITHOUT ROWID table and has no rowid. On an INSERT,
130203 ** pkChng will only be true if the INSERT statement provides an integer
130629 onError = OE_Ignore; /* DO NOTHING is the same as INSERT OR IGNORE */
130852 onError = OE_Ignore; /* DO NOTHING is the same as INSERT OR IGNORE */
131146 ** This routine generates code to finish the INSERT or UPDATE operation
131161 int update_flags, /* True for UPDATE, False for INSERT */
131360 ** INSERT INTO tab1 SELECT * FROM tab2;
131500 ** INSERT INTO t2 SELECT * FROM t1;
131503 ** the SELECT statement on the right but the INSERT statement on the
131705 /* This INSERT command is part of a VACUUM operation, which guarantees
139367 ** on the right-hand side of an INSERT contains more result columns than
143116 ** INSERT INTO t1 VALUES(123,'0123');
143133 ** INSERT INTO t1 VALUES(10.0);
146510 ** CREATE TRIGGER attached.demo AFTER INSERT ON attached.tab ....
146740 "INSERT INTO %Q." LEGACY_SCHEMA_TABLE
146842 ** Build a trigger step out of an INSERT statement. Return a pointer
146845 ** The parser calls this routine when it sees an INSERT inside the
147411 ** CREATE TRIGGER AFTER INSERT ON t1 BEGIN;
147412 ** INSERT OR REPLACE INTO t2 VALUES(new.a, new.b);
147415 ** INSERT INTO t1 ... ; -- insert into t2 uses REPLACE policy
147416 ** INSERT OR IGNORE INTO t1 ... ; -- insert into t2 uses IGNORE policy
147564 (pTrigger->op==TK_INSERT ? "INSERT" : ""),
147695 ** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
147722 ** Similarly, for ON INSERT triggers the values stored in the OLD.* registers
147724 ** ON INSERT trigger, the value passed to this function as parameter reg
147762 ** 2. This is a RETURNING trigger for INSERT but we are currently
148270 /* On an UPSERT, reuse the same cursors already opened by INSERT */
148557 ** the outer INSERT and the data cursor should be pointing at the row
149493 /* pUpsert does not own pTop->pUpsertSrc - the outer INSERT statement does.
149553 ** or INSERT. Historically there have been attacks that first
149818 ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy
149822 "SELECT'INSERT INTO vacuum_db.'||quote(name)"
149838 "INSERT INTO vacuum_db.sqlite_schema"
150353 ** The first invocation, to obtain permission to INSERT a row into the
162093 ** the FROM clause of a select. (INSERT and UPDATE statements are the
167581 0, /* INSERT => nothing */
167854 /* 127 */ "INSERT",
168105 /* 52 */ "refarg ::= ON INSERT refact",
168224 /* 171 */ "insert_cmd ::= INSERT orconf",
168316 /* 263 */ "trigger_event ::= DELETE|INSERT",
169016 225, /* (52) refarg ::= ON INSERT refact */
169135 269, /* (171) insert_cmd ::= INSERT orconf */
169227 288, /* (263) trigger_event ::= DELETE|INSERT */
169426 -3, /* (52) refarg ::= ON INSERT refact */
169545 -2, /* (171) insert_cmd ::= INSERT orconf */
169637 -1, /* (263) trigger_event ::= DELETE|INSERT */
170025 case 52: /* refarg ::= ON INSERT refact */
170054 case 171: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==171);
170935 case 263: /* trigger_event ::= DELETE|INSERT */
170967 "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
171989 ** 0: INSERT
172224 testcase( i==83 ); /* INSERT */
177849 ** MEM_IntReal values only arise during an INSERT operation of integer
190206 /* 18 */ "INSERT INTO %Q.'%q_content' VALUES(%s)",
190800 ** This function is called by the xUpdate() method as part of an INSERT
190829 ** This function is called by the xUpdate() method for an INSERT operation.
190833 ** apVal[0] Not used for INSERT.
190848 sqlite3_stmt *pContentInsert; /* INSERT INTO %_content VALUES(...) */
190865 ** INSERT INTO %_content VALUES(?, ?, ?, ...)
190879 /* There is a quirk here. The users INSERT statement may have specified
190884 ** INSERT INTO fts3tbl(rowid, docid) VALUES(1, 2);
193436 ** INSERT INTO <tbl>(<tbl>) VALUES('rebuild');
194987 ** INSERT INTO table(table) VALUES('merge=A,B');
195031 ** INSERT INTO table(table) VALUES('automerge=X');
195296 ** Handle a 'special' INSERT of the form:
195298 ** "INSERT INTO tbl(tbl) VALUES(<expr>)"
195560 || nArg==(2 + p->nColumn + 3) /* INSERT or UPDATE operations */
195563 /* Check for a "special" INSERT operation. One of the form:
195565 ** INSERT INTO xyz(xyz) VALUES('command');
195592 /* If this is an INSERT operation, or an UPDATE that modifies the rowid
195614 ** the statement is either an INSERT or an UPDATE that modifies the
195647 /* If this is an INSERT or UPDATE operation, insert the new record. */
204362 ** INSERT INTO rtree...
204465 "INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(?1, ?2)",
204470 "INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(?1, ?2)",
204475 "INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(?1, ?2)",
204501 "INSERT INTO \"%w\".\"%w_node\"VALUES(1,zeroblob(%d))",
204532 zFormat = "INSERT INTO\"%w\".\"%w_rowid\"(rowid,nodeno)VALUES(?1,?2)"
206916 ** For INSERT:
206961 && (!oldRowidValid /* INSERT */
208322 ** * The transaction must consist of INSERT, UPDATE and DELETE operations
208325 ** * INSERT statements may not use any default values.
208402 ** For each row to INSERT into the target database as part of the RBU
208437 ** INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..x');
208449 ** INSERT INTO data_t1(a, b, c, rbu_control) VALUES(4, NULL, 'usa', '..d');
208467 ** INSERT INTO data_ft1(a, b, rbu_rowid, rbu_control)
209097 sqlite3_stmt *pInsert; /* Statement for INSERT operations */
209168 ** INSERT operations. However, it is inaccurate if:
210972 ** INSERT INTO rbu_tmp_xxx VALUES(?, ?, ? ...);
210991 "INSERT INTO %s.'rbu_tmp_%q'(rbu_control,%s%s) VALUES(%z)",
211175 sqlite3_mprintf("INSERT INTO \"rbu_imp_%w\" VALUES(%s)", zTbl, zBind)
211263 /* Create the INSERT statement to write to the target PK b-tree */
211267 "INSERT INTO \"%s%w\"(%s%s) VALUES(%s)",
211274 ** Because it only performs INSERT operations, this is not required for
211321 "CREATE TEMP TRIGGER rbu_insert_tr AFTER INSERT ON \"%s%w\" "
212176 /* If this is an INSERT into a table b-tree and the table has an
212337 "INSERT OR REPLACE INTO %s.rbu_state(k, v) VALUES "
212438 "INSERT INTO sqlite_schema VALUES(?,?,?,?,?)"
215690 ** A changeset is a collection of DELETE, UPDATE and INSERT operations on
215715 ** The new.* record that is part of each INSERT change contains the values
215719 ** of INSERT or DELETE changes never contain any undefined (type byte 0x00)
215749 ** full record for INSERT).
215765 ** The records associated with INSERT changes are in the same format as for
215766 ** changesets. It is not possible for a record associated with an INSERT
215794 ** that caused the conflict was an INSERT or UPDATE, or to SQLITE_DELETE if
215800 ** was an INSERT, then the single record is a copy of the new.* record. If
215811 u8 op; /* One of UPDATE, DELETE, INSERT */
216810 ** (UPDATE, INSERT, DELETE) is specified by the first argument.
216816 int op, /* One of SQLITE_UPDATE, INSERT, DELETE */
216878 ** values (if this is an INSERT). */
217007 int op, /* SQLITE_UPDATE, DELETE or INSERT */
218825 /* If this is an INSERT or UPDATE, read the new.* record. */
219288 sqlite3_stmt *pInsert; /* INSERT statement */
219557 ** Formulate and prepare an INSERT statement to add a record to table zTab.
219560 ** INSERT INTO main."zTab" VALUES(?1, ?2, ?3 ...);
219574 sessionAppendStr(&buf, "INSERT INTO main.", &rc);
219609 "INSERT INTO main.sqlite_stat1 VALUES(?1, "
219706 ** If the iterator currently points to an INSERT record, bind values from the
220075 /* If the bReplace flag is set, the change is an INSERT that has not
220079 ** before reattempting the INSERT. */
220566 ** op1=INSERT, op2=INSERT -> Unsupported. Discard op2.
220567 ** op1=INSERT, op2=UPDATE -> INSERT.
220568 ** op1=INSERT, op2=DELETE -> (none)
220570 ** op1=UPDATE, op2=INSERT -> Unsupported. Discard op2.
220574 ** op1=DELETE, op2=INSERT -> UPDATE.
220605 if( op1==SQLITE_INSERT ){ /* INSERT + UPDATE */
220611 }else if( op1==SQLITE_DELETE ){ /* DELETE + INSERT */
222107 ** INSERT INTO tbl(tbl, rank) VALUES('prefix-index', $bPrefixIndex);
230301 sqlite3_stmt *pWriter; /* "INSERT ... %_data VALUES(?,?)" */
230303 sqlite3_stmt *pIdxWriter; /* "INSERT ... %_idx VALUES(?,?,?,?)" */
230749 ** INSERT OR REPLACE a record into the %_data table.
234192 "INSERT INTO '%q'.'%q_idx'(segid,term,pgno) VALUES(?,?,?)",
234835 ** INSERT command.
238331 ** This function is called to handle an FTS INSERT command. In other words,
238332 ** an INSERT statement of the form:
238334 ** INSERT INTO fts(fts) VALUES($pCmd)
238335 ** INSERT INTO fts(fts, rank) VALUES($pCmd, $pVal)
238337 ** Argument pVal is the value assigned to column "fts" by the INSERT
238342 ** INSERT Directives" section of the documentation. It should be updated if
238473 /* A "special" INSERT op. These are handled separately. */
238483 /* A regular INSERT, UPDATE or DELETE statement. The trick here is that
238490 ** 4) INSERT
238518 /* INSERT or UPDATE */
239832 "INSERT INTO %Q.'%q_content' VALUES(%s)", /* INSERT_CONTENT */
240211 ** INSERT OR REPLACE INTO %_docsize(id, sz) VALUES(iRowid, pBuf);
246162 sql = sqlite3_mprintf("SELECT 'INSERT INTO %s.' || quote(name) || ' SELECT * FROM main.' || quote(name) || ';' FROM main.sqlite_master WHERE type = 'table' AND name!='sqlite_sequence' AND rootpage>0;", dbName);
246182 sql = sqlite3_mprintf("SELECT 'INSERT INTO %s.' || quote(name) || ' SELECT * FROM main.' || quote(name) || ';' FROM %s.sqlite_master WHERE name=='sqlite_sequence';", dbName, dbName);
246192 sql = sqlite3_mprintf("INSERT INTO %s.sqlite_master SELECT type, name, tbl_name, rootpage, sql FROM main.sqlite_master WHERE type='view' OR type='trigger' OR (type='table' AND rootpage=0);", dbName, dbName);