antares
antares copied to clipboard
Sqlite: Unable to view trigger code
Describe the bug After creation trigger unable to view it code in ui
To Reproduce Steps to reproduce the behavior:
- Create sqlite database
- Create table:
create table
test (
id integer primary key,
description text,
updated_at text not null default current_timestamp
);
- Create trigger:
create TRIGGER tg_test_updated_at_update after
update on test for each row begin
update test
set
updated_at = current_timestamp
where
id = old.id;
end;
- Try open created trigger in ui
- Get error:
TypeError: Cannot read properties of null (reading '0')
Expected behavior I can look at trigger code
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, for better-sqlite3 you need to use get method instead of run to get trigger code
At first glance, it appears that the problem does not occur when the trigger is created via GUI, even though the query that creates it is identical. I will do further testing.