/** * テストデータを作る */ protected function provider() { $mysqli = new Cascade_Driver_SQL_MySQLi('gree(mysql)://master/test'); // テストデータを作る // SINGLE-COLUMN-INDEX $mysqli->query('DROP TABLE IF EXISTS test_cascade'); $mysqli->query($this->get_table_schema()); $mysqli->query('INSERT INTO test_cascade VALUE(default, 100, 1, 1, now(), now())'); // @id=1 $mysqli->query('INSERT INTO test_cascade VALUE(default, 100, 2, 2, now(), now())'); // @id=2 $mysqli->query('INSERT INTO test_cascade VALUE(default, 100, 3, 3, now(), now())'); // @id=3 $mysqli->query('INSERT INTO test_cascade VALUE(default, 100, 4, 5, now(), now())'); // @id=4 $mysqli->query('INSERT INTO test_cascade VALUE(default, 101, 1, 3, now(), now())'); // @id=5 $mysqli->query('INSERT INTO test_cascade VALUE(default, 102, 2, 1, now(), now())'); // @id=6 $mysqli->query('INSERT INTO test_cascade VALUE(default, 103, 3, 1, now(), now())'); // @id=7 $mysqli->query('INSERT INTO test_cascade VALUE(default, 104, 4, 1, now(), now())'); // @id=8 $mysqli->query('INSERT INTO test_cascade VALUE(default, 105, 1, 3, now(), now())'); // @id=9 $mysqli->query('INSERT INTO test_cascade VALUE(default, 105, 5, 4, now(), now())'); // @id=10 }
/** * テストデータを作る */ protected function provider() { // テストデータを作る $mysqli = new Cascade_Driver_SQL_MySQLi('gree(mysql)://master/test'); // MULTI-COLUMN-INDEX $mysqli->query('DROP TABLE IF EXISTS test_cascade'); $mysqli->query($this->get_table_schema()); $mysqli->query('INSERT INTO test_cascade VALUE(100, 1, 1, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(100, 2, 2, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(100, 3, 3, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(100, 4, 5, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(101, 1, 3, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(102, 2, 1, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(103, 3, 1, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(104, 4, 1, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(105, 1, 3, now(), now())'); $mysqli->query('INSERT INTO test_cascade VALUE(105, 5, 4, now(), now())'); }