• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-13-stable/contrib/sqlite3/

Lines Matching refs:constraints

3164 ** [foreign key constraints].  There should be two additional arguments.
3371 ** CHECK constraints, DEFAULT clauses, expression indexes,
5576 ** WHERE clause constraints and the table content, it might return no rows.
6164 ** within VIEWs, TRIGGERs, CHECK constraints, generated column expressions,
6170 ** used inside of triggers, view, CHECK constraints, or other elements of
6311 ** schema structures such as [CHECK constraints], [DEFAULT clauses],
6333 ** schema structures such as [CHECK constraints], [DEFAULT clauses],
6945 ** If a collating function fails any of the above constraints and that
7887 ** ^(The aConstraint[] array records WHERE clause constraints of the form:
7986 } *aConstraint; /* Table of WHERE clause constraints */
8246 ** <li> ^([foreign key constraints | Foreign key constraints] are enabled,
9274 ** all foreign key constraints (deferred or immediate) have been
10259 ** support constraints. In this configuration (which is the default) if
14966 ** Value constraints (enforced via assert()):
15289 ** the lifetime of the cursor) that defines constraints on which rows
15309 #define BTREE_HINT_RANGE 0 /* Range constraints on queries */
17083 i64 nDeferredCons; /* Net deferred constraints this transaction. */
17084 i64 nDeferredImmCons; /* Net deferred immediate constraints */
17124 ** Value constraints (enforced via assert()):
17140 #define SQLITE_IgnoreChecks 0x00000200 /* Do not enforce check constraints */
17145 #define SQLITE_ForeignKeys 0x00004000 /* Enforce foreign key constraints */
17150 #define SQLITE_DeferFKs 0x00080000 /* Defer all FK constraints */
17200 #define SQLITE_Transitive 0x00000080 /* Transitive constraints */
17290 ** Value constraints (enforced via assert()):
17637 u8 bConstraint; /* True if constraints are supported */
17660 ExprList *pCheck; /* All CHECK constraints */
17714 #define TF_HasNotNull 0x0800 /* Contains NOT NULL constraints */
18484 ** Value constraints (enforced via assert()):
18553 ** Value constraints (all checked via assert()):
18659 ** Value constraints (all checked via assert())
18978 ** Also used to hold redundant UNIQUE constraints
19040 ** Value constraints (enforced via assert()):
20461 ** provided (enforcement of FK constraints requires the triggers sub-system).
21380 i64 nFkConstraint; /* Number of imm. FK constraints this VM */
21381 i64 nStmtDefCons; /* Number of def. constraints when stmt started */
21382 i64 nStmtDefImmCons; /* Number of def. imm constraints when stmt started */
21974 ** key constraints. Set *pCurrent to zero if all foreign key constraints
30187 /* This only happens when coding check constraints */
81494 ** key constraints to hold up the transaction. This means a commit
92744 ** (deferred foreign key constraints). Otherwise, if P1 is zero, the
92745 ** statement counter is incremented (immediate foreign key constraints).
98414 ** within sqlite3WindowOffsetExpr(). Because of constraints imposed
98899 /* Silently ignore database qualifiers inside CHECK constraints and
99353 else if( pNC->ncFlags & NC_IsCheck ) zIn = "CHECK constraints";
100604 ** (1) CHECK constraints NC_IsCheck
103226 ** to NOT NULL constraints in the schema). If no NULL values are possible,
104532 ** constraints, and that constant is coded by the pExpr->pLeft
104555 /* Other columns in the same row for CHECK constraints or
106209 /* Virtual tables are allowed to use constraints like x=NULL. So
108320 ** of any foreign key constraints that use the table being renamed as the
113177 ** indexes and PRIMARY KEY constraints and in UNIQUE constraints. Example:
114038 /* If errors are seen, delete the CHECK constraints now, else they might
114423 ** normally holds CHECK constraints on an ordinary table, but for
115460 "UNIQUE constraints");
115562 ** Two UNIQUE or PRIMARY KEY constraints are considered equivalent
115567 ** the constraint occur in different orders, then the constraints are
116498 ** rollback the whole transaction. For operations where all constraints
118223 /* Do FK processing. This call checks that any FK constraints that
118224 ** refer to this table (i.e. constraints attached to other tables)
120744 ** Deferred constraints are implemented using a simple counter associated
120788 ** for FK constraints for which the affected columns are actually
120794 ** For the purposes of immediate FK constraints, the OR REPLACE conflict
120800 ** Immediate constraints are usually handled similarly. The only difference
121054 ** outstanding constraints to resolve. If there are not, there is no need
121389 ** NULL pointer (as there are no FK constraints for which t2 is the parent
121444 ** the entire DELETE if there are no outstanding deferred constraints
121466 ** constraints are violated.
121607 /* Loop through all the foreign key constraints for which pTab is the
121640 ** before actually dropping it in order to check FK constraints.
121710 /* Loop through all the foreign key constraints that refer to this table.
121711 ** (the "child" constraints) */
123406 /* Generate code to check constraints and generate index keys and
123419 int isReplace; /* Set to true if constraints may cause a replace */
123427 ** constraints or (b) there are no triggers and this table is not a
123697 ** This routine also generates code to check constraints. NOT NULL,
123698 ** CHECK, and UNIQUE constraints are all checked. If a constraint fails,
123769 /* Variables associated with retesting uniqueness constraints after
123772 int addrRecheck = 0; /* Jump here to recheck all uniqueness constraints */
123801 /* Test all NOT NULL constraints.
123882 /* If there are no generated columns with NOT NULL constraints
123883 ** and no NOT NULL ON CONFLICT REPLACE constraints, then a single
123891 /* If any NOT NULL ON CONFLICT REPLACE constraints fired on the
123899 } /* end if( has-not-null-constraints ) */
123901 /* Test all CHECK constraints
123915 /* The check constraints do not reference any of the columns being
123946 /* UNIQUE and PRIMARY KEY constraints should be handled in the following
123960 ** The order of constraints used to have OE_Update as (2) and OE_Abort
123966 ** (B) Unique index constraints that do not have OE_Replace as their
124038 ** recheck all of the uniqueness constraints after they have all run.
124055 /* There are not DELETE triggers nor FK constraints. No constraint
124113 ** the UNIQUE constraints have run.
124116 && onError!=overrideError /* Rules for other constraints are different */
124117 && pTab->pIndex /* There exist other constraints */
124221 /* Test all UNIQUE constraints by creating entries for each UNIQUE
124527 /* Recheck all uniqueness constraints after replace triggers have run */
125041 return 0; /* Tables have different CHECK constraints. Ticket #2252 */
125046 ** any foreign key constraints. This is more restrictive than necessary.
125048 ** command, and the VACUUM command disables foreign key constraints. So
129235 /* Verify CHECK constraints */
129923 ** query planner to give == constraints on as many hidden parameters as
130104 pragmaVtabFilter, /* xFilter - configure scan constraints */
134923 ** Flattening is subject to the following constraints:
135472 ** a known value due to WHERE clause constraints of the form COLUMN=VALUE.
137336 ** means that flattening does occur on simpler SQL constraints without
140867 /* Fire any BEFORE UPDATE triggers. This happens before constraints are
140952 /* If changing the rowid value, or if there are foreign key constraints
141755 ** disable CHECK and foreign key constraints. */
143411 ** one corresponding WhereLoop object (unless INDEXED BY constraints
143435 u16 nEq; /* Number of equality constraints */
143873 ** Value constraints:
144392 ** this is only guaranteed for TK_ISNULL and TK_IN constraints. If the
144397 ** straight-line code. For constraints of the form X IN (...)
144537 ** Generate code that will evaluate all == and IN constraints for an
144542 ** The index has as many as three equality constraints, but in this
144544 ** constraints are coded. This routine will generate code to evaluate
144553 ** The nExtraReg parameter is 0 or 1. It is 0 if all WHERE clause constraints
144556 ** occurs after the nEq quality constraints.
144569 ** with equality constraints that use BLOB or NONE affinity are set to
144588 u16 nEq; /* The number of == or IN constraints to code */
144635 /* Evaluate the equality constraints
145247 ** there are no IN operators in the constraints, the "addrNxt" label
145289 int iIn; /* Counter for IN constraints */
145441 testcase( pStart->leftCursor!=iCur ); /* transitive constraints */
145476 testcase( pEnd->leftCursor!=iCur ); /* Transitive constraints */
145512 ** inequality constraints (>, <, >= or <=) on the indexed
145530 ** N may be zero if there are inequality constraints.
145531 ** If there are no inequality constraints, then N is at
145535 ** constraints but an index is selected anyway, in order
145586 /* Like optimization range constraints always occur in pairs */
145595 assert( pRangeStart!=0 ); /* LIKE opt constraints */
146250 ** constraints to be generated. The value of stack variable iLoop
146251 ** determines the constraints coded by each iteration, as follows:
146324 /* Insert code to test for implied constraints based on transitivity
146568 ** can be optimized using inequality constraints. Return TRUE if it is
147924 /* Add constraints to reduce the search space on a LIKE or GLOB
147927 ** A like pattern of the form "x LIKE 'aBc%'" is changed into constraints
147955 ** the range constraints also work for BLOBs
148742 ** the WHERE clause that specifies that X=Y. Any such constraints will be
149074 ** and used to match WHERE clause constraints */
149262 /* Count the number of possible WHERE clause constraints referring
149326 /* tag-20191211-002: WHERE-clause constraints are not useful to the
149780 ** equality constraints optimized by the proposed index scan. For example,
149794 ** considering the range constraints. If nEq is 0, then *pnOut is the number of
149796 ** to account for the range constraints pLower and pUpper.
149800 ** and a pair of constraints (x>? AND x<?) reduces the expected number of
150412 ** UNIQUE constraint) with one or more == constraints is better
150687 int nEq, /* Number of prior equality constraints on same index */
150765 int opMask; /* Valid operators for constraints */
150778 WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */
150822 continue; /* ignore IS [NOT] NULL constraints on NOT NULL columns */
150830 /* tag-20191211-001: Do not allow constraints from the WHERE clause to
150831 ** be used by the right table of a LEFT JOIN. Only constraints in the
150942 /* Range constraints that come from the LIKE optimization are
151090 /* Consider using a skip-scan if there are no WHERE clause constraints
151492 ** Argument pIdxInfo is already populated with all constraints that may
151494 ** function marks a subset of those constraints usable, invokes the
151517 u16 mNoOmit, /* Do not omit these constraints */
151535 /* Set the usable flag on the subset of constraints identified by
151722 int nConstraint; /* Number of constraints in p */
151748 /* First call xBestIndex() with all constraints usable. */
152832 ** simple == constraints against indexed fields. This routine attempts
170020 ** bits, used to describe extra constraints on full-text searches.
171629 ** so search through the constraints to see if a more efficient
175412 ** constraints. In this case it returns 1. If the NEAR expression does not
176275 /* Search for equality and range constraints on the "term" column.
176276 ** And equality constraints on the hidden "languageid" column. */
190907 int aIdx[2]; /* Index of constraints for JSON and ROOT */
190908 int unusableMask = 0; /* Mask of unusable JSON and ROOT constraints */
190909 int idxMask = 0; /* Mask of usable == constraints JSON and ROOT */
190933 /* If there are any unusable constraints on JSON or ROOT, then reject
191048 jsonEachFilter, /* xFilter - configure scan constraints */
191076 jsonEachFilter, /* xFilter - configure scan constraints */
191463 RtreeConstraint *aConstraint; /* Search constraints. */
192874 /* Move to the next entry that matches the configured constraints. */
193059 ** with the configured constraints.
194422 ** with "column" that are interpreted as table constraints.
194662 rtreeFilter, /* xFilter - configure scan constraints */
196944 ** with the configured constraints.
197309 geopolyFilter, /* xFilter - configure scan constraints */
198546 ** * CHECK constraints are not enforced.
198558 ** have no PRIMARY KEY or UNIQUE constraints, but each column should have
201085 ** same schema as the actual target table (less any UNIQUE constraints).
205130 statFilter, /* xFilter - configure scan constraints */
205292 /* Check for constraints against pgno */
205549 dbpageFilter, /* xFilter - configure scan constraints */
209140 int bDeferConstraints; /* True to defer constraints */
209141 int bInvertConstraints; /* Invert when iterating constraints buffer */
209142 SessionBuffer constraints; /* Deferred constraints are stored here */
209699 ** to the SessionApplyCtx.constraints buffer. */
209702 sessionAppendBlob(&p->constraints, aBlob, nBlob, &rc);
209949 ** Retry the changes accumulated in the pApply->constraints buffer.
209961 while( pApply->constraints.nBuf ){
209963 SessionBuffer cons = pApply->constraints;
209964 memset(&pApply->constraints, 0, sizeof(SessionBuffer));
209987 assert( pApply->bDeferConstraints || pApply->constraints.nBuf==0 );
209991 if( pApply->constraints.nBuf>=cons.nBuf ){
210073 memset(&sApply.constraints, 0, sizeof(SessionBuffer));
210195 sqlite3_free((char*)sApply.constraints.aBuf);
227047 ** constraints also present. As follows:
227049 ** * No other constraints: cost=1000.0
227051 ** * Both rowid range constraints: cost=500.0
227056 ** * No other constraints: cost=1000000.0
227058 ** * Both rowid range constraints: cost=250000.0
227835 ** sqlite3_index_constraint.omit flag clear for range constraints
233396 ** Only constraints of the form:
234187 stmtFilter, /* xFilter - configure scan constraints */