You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unable to create a trigger with syntax begin...end
To Reproduce
Steps to reproduce the behavior:
Create sqlite database
Create table:
create table
test (
id integerprimary key,
description text,
updated_at textnot null default current_timestamp
);
Try create trigger:
createTRIGGERtg_test_updated_at_update after
updateon test for each row beginupdate test
set
updated_at =current_timestampwhere
id =old.id;
end;
Get error: SqliteError: incomplete input
Expected behavior
Trigger created
Application (please complete the following information):
App client: sqlite
App version 0.7.30
Installation source: exe
Environment (please complete the following information):
OS name: Windows 10
OS version: 22H2
DB name: sqlite
DB version: 3.45.3
Additional context
As I understand it, this is where query string is splitting. Trigger creation code is splitting into 2 lines, which results in an error
Example of splitting
['CREATE TRIGGER tg_test_updated_at_update\n'+' AFTER UPDATE\n'+' ON test\n'+' FOR EACH ROW\n'+'BEGIN\n'+' UPDATE test\n'+' SET updated_at = current_timestamp\n'+' WHERE id = old.id','END']
The text was updated successfully, but these errors were encountered:
Yes, the problem in this case is because the queries are split by ; to display the results separately.
Probably the best solution is to implement an option to disable automatic splits.
Currently the solution to the problem would be to create the trigger via GUI.
Describe the bug
Unable to create a trigger with syntax
begin...end
To Reproduce
Steps to reproduce the behavior:
SqliteError: incomplete input
Expected behavior
Trigger created
Application (please complete the following information):
Environment (please complete the following information):
Additional context
As I understand it, this is where query string is splitting. Trigger creation code is splitting into 2 lines, which results in an error
Example of splitting
The text was updated successfully, but these errors were encountered: