Lines Matching refs:child

406 # to prohibit NULL child keys from being inserted.
507 # for each row in the child table either one or more of the child key
510 # associated child key column.
554 # Specifically, test that when comparing child and parent key values the
584 # Specifically, test that when comparing child and parent key values the
585 # affinity of the parent key column is applied to the child key value
589 # column has an affinity, then that affinity is applied to the child key
743 # the child or parent tables in ways that use the foreign keys.
754 # sequence specified in the CREATE TABLE, or The child table references
757 # match the number of child key columns.
821 # mapping a child key to the primary key of the parent table when the
822 # child key consists of a different number of columns to that primary key.
860 # Test errors that are reported when creating the child table.
863 # * different number of child and parent key columns, and
864 # * child columns that do not exist.
867 # recognized simply by looking at the definition of the child table and
869 # TABLE statement for the child table fails.
928 # Test that an index on on the child key columns of an FK constraint
931 # EVIDENCE-OF: R-15417-28014 Indices are not required for child key
934 # Also test that if an index is created on the child key columns, it does
937 # EVIDENCE-OF: R-15741-50893 The child key index does not have to be
968 # table, the child table is queried for orphaned rows as follows:
1035 # SELECT rowid FROM <child-table> WHERE <child-key> = :parent_key_value
1038 # constraint, the child table is queried for orphaned rows. The
1041 # SELECT rowid FROM <child-table> WHERE <child-key> = :parent_key_value
1048 # SELECT rowid FROM <child-table> WHERE <child-key> = :parent_key_value
1061 CREATE TABLE child(a, b, FOREIGN KEY(a, b) REFERENCES parent(x, y))
1064 CREATE TABLE child(a, b, FOREIGN KEY(a, b) REFERENCES parent(x, y));
1065 CREATE INDEX childi ON child(a, b);
1068 CREATE TABLE child(a, b, FOREIGN KEY(a, b) REFERENCES parent(x, y));
1069 CREATE UNIQUE INDEX childi ON child(b, a);
1077 [eqp "SELECT rowid FROM child WHERE a = ? AND b = ?"]
1081 [eqp "SELECT rowid FROM child WHERE a = ? AND b = ?"] \
1082 [eqp "SELECT rowid FROM child WHERE a = ? AND b = ?"]
1089 execsql {DROP TABLE child}
1136 # Check that parent and child keys must have the same number of columns.
1138 # EVIDENCE-OF: R-41062-34431 Parent and child keys must have the same
1223 # EVIDENCE-OF: R-33626-48418 In SQLite, if any of the child key columns
1353 CREATE TABLE child(a, b,
1358 test_efkey_35 2 1 "INSERT INTO child VALUES('x', 'y')"
1360 test_efkey_35 4 0 "INSERT INTO child VALUES('x', 'y')"
1769 # Test that "NO ACTION" means that nothing happens to a child row when
1780 CREATE TABLE child(c1, c2,
1788 INSERT INTO child VALUES('j', 'k');
1789 INSERT INTO child VALUES('l', 'm');
1797 SELECT * FROM child;
1809 # or updating a parent table row when there exists one or more child keys
1815 # or more child keys mapped to it.
1941 # to return an error immediately if a parent key with dependent child
2017 # (for ON UPDATE SET NULL), the child key columns of all rows in the
2018 # child table that mapped to the parent key are set to contain SQL NULL
2059 # "SET NULL", except that each of the child key columns is set to
2101 # update operation on the parent key to each dependent child key.
2104 # means that each row in the child table that was associated with the
2142 # that the values stored in each dependent child key are modified to
2146 # update operation on the parent key to each dependent child key.
2235 CREATE TABLE child(d DEFAULT 'a', e, f DEFAULT 'c',
2241 INSERT INTO child VALUES('one', 'two', 'three');
2248 SELECT * FROM child;
2273 # corresponds to the default values of the child key columns, deleting a
2274 # parent key while dependent child keys exist still causes a foreign key
2332 CREATE TABLE child(
2340 INSERT INTO child VALUES(1);
2346 SELECT * FROM parent ORDER BY rowid; SELECT 'xxx' ; SELECT a FROM child;
2351 DELETE FROM child;
2354 INSERT INTO child VALUES(-1);
2356 SELECT * FROM parent ORDER BY rowid; SELECT 'xxx' ; SELECT a FROM child;
2429 CREATE TABLE child(y REFERENCES parent ON UPDATE SET NULL);
2431 INSERT INTO child VALUES('key');
2437 SELECT IFNULL(y, 'null') FROM child;
2443 SELECT IFNULL(y, 'null') FROM child;
2464 # are the same number of columns in the child and parent keys. (TODO: This
2533 # EVIDENCE-OF: R-43040-62530 The text of the child CREATE TABLE
2865 # MATCH SIMPLE behavior: Allow any child key that contains one or more
2867 # parent key values, so long as at least one field of the child key is
2875 # in the child key columns.