Experiments in applying Entity-Component-System patterns to durable data storage APIs.
1begin;
2
3drop trigger if exists components_last_modified_trigger;
4
5insert
6or ignore into components (entity, component, data)
7select
8 entity,
9 'ecsdb::LastUpdated',
10 json_quote (max(last_modified))
11from
12 components
13group by
14 entity;
15
16alter table components
17drop last_modified;
18
19commit;