• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/sqlite-3.6.22/

Lines Matching refs:constraint

900 #define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
1855 ** ^An [INSERT] that fails due to a constraint violation is not a
1860 ** encounters a constraint violation, it does not fail. The
1862 ** the constraint problem so INSERT OR REPLACE will always change
1897 ** are changed as side effects of [REPLACE] constraint resolution,
3363 ** ^[SQLITE_ERROR] means that a run-time error (such as a constraint
4351 ** an error or constraint causes an implicit rollback to occur.
4515 ** <tr><td> 7th <td> int <td> True if column has a NOT NULL constraint
4556 int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
4724 ** expr on the right-hand side can be evaluated (and thus the constraint
4740 ** is true, then the constraint is assumed to be fully handled by the
4761 int iColumn; /* Column on left-hand side of constraint */
4763 unsigned char usable; /* True if this constraint is usable */
4773 int argvIndex; /* if >0, constraint is part of argv to xFilter */
4774 unsigned char omit; /* Do not code a test for this constraint */
8558 u8 notNull; /* True if there is a NOT NULL constraint */
8782 ** Each foreign key constraint is an instance of the following structure.
8808 u8 isDeferred; /* True if constraint checking is deferred till COMMIT */
8818 ** SQLite supports many different ways to resolve a constraint
8819 ** error. ROLLBACK processing means that a constraint violation
8826 ** occurs. IGNORE means that the particular row that caused the constraint
8829 ** a UNIQUE constraint violation are removed so that the new insert or
8842 #define OE_None 0 /* There is no constraint to check */
9452 u8 isCheck; /* True if resolving names in a CHECK constraint */
13825 ** fragmentation as long as the following constraint holds:
13830 ** that an application can, at any time, verify this constraint.
15877 ** xScratchMalloc(). We verify this constraint in the single-threaded
39655 ** size supplied does not meet this constraint then the page size is not
40719 ** the result of a constraint, malloc() failure or IO error) then
40760 ** that are contained within a BEGIN...COMMIT block. If a constraint
47486 ** * OP_FkCounter with P2==0 (immediate foreign key constraint)
49086 ** database handles deferred constraint counter to the value it had when
49125 ** committed. If there are outstanding deferred foreign key constraint
49138 sqlite3SetString(&p->zErrMsg, db, "foreign key constraint failed");
49241 ** or hit an 'OR FAIL' constraint and there are no deferred foreign
54781 ** constraint violations present in the database to the value stored
54934 /* Store the current value of the database handles deferred constraint
57173 ** Increment a "constraint counter" by P2 (P2 may be negative or positive).
57174 ** If P1 is non-zero, the database constraint counter is incremented
57189 ** This opcode tests if a foreign key constraint-counter is currently zero.
57193 ** If P1 is non-zero, then the jump is taken if the database constraint-counter
57194 ** is zero (the one that counts deferred constraint violations). If P1 is
57195 ** zero, the jump is taken if the statement constraint-counter is zero
57196 ** (immediate foreign key constraint violations).
60910 ** to enforce this constraint.
61546 assert( p->iTable>=0 ); /* p cannot be part of a CHECK constraint */
61633 ** has a UNIQUE constraint or UNIQUE index.
62063 ** of a "NOT NULL" constraint in the database schema.
64614 ** If there is a NOT NULL constraint, then the default value for the
67190 ** parsing a CREATE TABLE statement. A "NOT NULL" constraint has
67398 ** Add a new CHECK constraint to the table currently under construction.
67676 /* Resolve names in all CHECK constraint expressions.
68571 ** UNIQUE constraint. If pTable and pIndex are NULL, use pParse->pNewTable
68576 ** is a primary key or unique-constraint on the most recent column added
68697 ** dealing with a primary key or UNIQUE constraint. We have to invent our
68883 ** the constraint occur in different orders, then the constraints are
68904 /* This constraint creates the same index as a previous
68905 ** constraint specified somewhere in the CREATE TABLE statement.
68907 ** constraint and the previous equivalent constraint have explicit
68954 ** or UNIQUE constraint of a CREATE TABLE statement. Since the table
68983 /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
69014 ** OE_Ignore. This is necessary for the correct constraint check
69110 "or PRIMARY KEY constraint cannot be dropped", 0);
69696 ** be set for operations that might fail (due to a constraint) part of
72559 ** If an immediate foreign key constraint is violated, SQLITE_CONSTRAINT
72561 ** deferred foreign key constraint is violated, no action is taken
72563 ** transaction before fixing the constraint violation, the attempt fails.
72574 ** * When a commit fails due to a deferred foreign key constraint,
72575 ** there is no way to tell which foreign constraint is not satisfied,
72588 ** constraint counter.
72593 ** found (as the constraint is now satisfied).
72617 ** If a delete caused by OR REPLACE violates an FK constraint, an exception
72618 ** is thrown, even if the FK constraint would be satisfied after the new
72624 ** constraint counter is greater than zero, it returns SQLITE_CONSTRAINT
72628 ** INSERT violates a foreign key constraint. This is necessary as such
72677 ** A foreign key constraint requires that the key columns in the parent
72678 ** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
72679 ** Given that pParent is the parent table for foreign key constraint pFKey,
72686 ** If the parent key consists of a single column (the foreign key constraint
72691 ** constraint to the parent table column stored in the left-most column
72701 ** UNIQUE or PRIMARY KEY constraint, or
72718 Table *pParent, /* Parent table of FK constraint pFKey */
72825 ** child table of foreign key constraint pFKey. If an SQL UPDATE is executed
72838 ** INSERT immediate Increment the "immediate constraint counter".
72840 ** DELETE immediate Decrement the "immediate constraint counter".
72842 ** INSERT deferred Increment the "deferred constraint counter".
72844 ** DELETE deferred Decrement the "deferred constraint counter".
72854 FKey *pFKey, /* Foreign key constraint */
72857 int nIncr, /* Increment constraint counter by this */
72870 ** any are, then the constraint is considered satisfied. No need to
72896 ** to increment the constraint-counter (i.e. this is an INSERT operation),
72898 ** increment the constraint-counter. */
72922 ** to increment the constraint-counter (i.e. this is an INSERT operation),
72924 ** increment the constraint-counter. */
72946 ** one row into the table, raise a constraint immediately instead of
72951 pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
72966 ** from the parent table of foreign key constraint pFKey and, if pFKey is
72977 ** DELETE immediate Increment the "immediate constraint counter".
72979 ** throw a "foreign key constraint failed" exception.
72981 ** INSERT immediate Decrement the "immediate constraint counter".
72983 ** DELETE deferred Increment the "deferred constraint counter".
72985 ** throw a "foreign key constraint failed" exception.
72987 ** INSERT deferred Decrement the "deferred constraint counter".
73082 ** clause. If the constraint is not deferred, throw an exception for
73084 ** deferred constraint counter by nIncr for each row selected. */
73110 ** to the FKey structure representing the foreign key constraint on table
73147 ** (a) The table is the parent table of a FK constraint, or
73148 ** (b) The table is the child table of a deferred FK constraint and it is
73150 ** constraint violations in the database,
73164 /* Search for a deferred foreign key constraint for which this table
73182 /* If the DELETE has generated immediate foreign key constraint
73188 pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
73199 ** table pTab to generate VDBE code to perform foreign key constraint
73298 ** outstanding foreign key constraint violation. */
73303 ** be found, adding the child row has violated the FK constraint. */
73346 ** immediately if the FK constraint is violated, even if this is a
73348 ** the constraint, the FK should specify NO ACTION (represented
73411 ** foreign key constraint. */
73586 pRaise = sqlite3Expr(db, TK_RAISE, "foreign key constraint failed");
73717 /* EV: R-30323-21917 Each foreign key constraint in SQLite is
74053 int onError, /* How to handle constraint errors */
74165 int onError /* How to handle constraint errors */
74791 ** Generate code to do constraint checks prior to an INSERT or an UPDATE.
74821 ** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
74857 ** for the constraint is used.
74875 int *pbMayReplace /* OUT: Set to true if constraint may cause a replace */
75323 int onError, /* How to handle constraint errors */
76922 ** Return a human-readable name for a constraint resolution action.
78222 ** constraint for a CREATE TABLE. The index should have already
81548 ** an ORDER BY clause. Ticket #3773. We could relax this constraint
84661 int onError /* How to handle constraint errors */
85048 /* Do constraint checks. */
85052 /* Do FK constraint checks. */
86748 #define WHERE_TOP_LIMIT 0x00100000 /* x<EXPR or x<=EXPR constraint */
86749 #define WHERE_BTM_LIMIT 0x00200000 /* x>EXPR or x>=EXPR constraint */
87793 /* Add a WO_MATCH auxiliary term to the constraint set if the
87870 ** index do not need to satisfy this constraint.) The *pbRev value is
87948 ** then the index cannot satisfy the ORDER BY constraint.
88024 sqlite3DebugPrintf(" constraint[%d]: col=%d termid=%d op=%d usabled=%d\n",
88370 ** table. In other words, if the constraint is of the form:
88374 ** and we are evaluating a join, then the constraint on column is
88590 ** range constraint. Or, equivalently, the number of equality constraints
88611 ** reduces the search space by 2/3rds. Hence a single constraint (x>?)
88612 ** results in a return of 33 and a range constraint (x>? AND x<?) results
88835 ** space to 1/3rd its original size. So an x>? constraint reduces
89147 ** The current value for the constraint is left in register iReg.
89149 ** For a constraint of the form X=expr, the expression is evaluated and its
89241 ** the right hand side of the equality constraint (t2.b) has NONE affinity,
89258 WhereTerm *pTerm; /* A single constraint term */
89558 int regBase; /* Base register holding constraint values */
89560 WhereTerm *pRangeStart = 0; /* Inequality constraint at range start */
89561 WhereTerm *pRangeEnd = 0; /* Inequality constraint at range end */
89565 int nConstraint; /* Number of constraint terms */
89594 /* Find any inequality constraint terms for the start and end
89606 /* Generate code to evaluate all constraint terms using == or IN
89666 /* Load the value for the inequality constraint at the end of the
95944 /* Any deferred constraint violations have now been resolved. */
95978 /* SQLITE_CONSTRAINT */ "constraint failed",
97177 int *pNotNull, /* OUTPUT: True if NOT NULL constraint exists */
99161 int iCons = -1; /* Index of constraint to use */
99182 /* A MATCH constraint. Use a full-text search.
99184 ** If there is more than one MATCH constraint available, use the first
99185 ** one encountered. If there is both a MATCH constraint and a direct
107418 ** A search constraint.
108322 ** constraint used. The first two bytes of idxStr correspond to
108323 ** the constraint in sqlite3_index_info.aConstraintUsage[] with
108326 ** The first of each pair of bytes in idxStr identifies the constraint
108339 ** to which the constraint applies. The leftmost coordinate column
108355 /* We have an equality constraint on the rowid. Use strategy 1. */
108384 /* Make sure this particular constraint has not been used before.
108391 ** A == is disqualifed if there is any prior constraint.
109700 goto constraint;
109709 goto constraint;
109723 goto constraint;
109742 constraint: