SQLite: Allow working with INSTEAD OF triggers
This commit is contained in:
parent
f4d2794c9c
commit
7d330a2d4b
|
@ -630,7 +630,7 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
|
||||||
return array("Statement" => "BEGIN\n\t;\nEND");
|
return array("Statement" => "BEGIN\n\t;\nEND");
|
||||||
}
|
}
|
||||||
preg_match(
|
preg_match(
|
||||||
'~^CREATE\\s+TRIGGER\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*([a-z]+)\\s+([a-z]+)\\s+ON\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*(?:FOR\\s*EACH\\s*ROW\\s)?(.*)~is',
|
'~^CREATE\\s+TRIGGER\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*(BEFORE|AFTER|INSTEAD\\s+OF)\\s+([a-z]+)\\s+ON\\s*(?:[^`"\\s]+|`[^`]*`|"[^"]*")+\\s*(?:FOR\\s*EACH\\s*ROW\\s)?(.*)~is',
|
||||||
$connection->result("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = " . q($name)),
|
$connection->result("SELECT sql FROM sqlite_master WHERE type = 'trigger' AND name = " . q($name)),
|
||||||
$match
|
$match
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue