Commit graph

16 commits

Author SHA1 Message Date
saji 68347e8b95 rework DB getters
Some checks failed
Go / build (1.21) (push) Failing after 1m6s
Go / build (1.22) (push) Failing after 1m6s
abandon generic query frag for common structures
Instead of using the QueryFrag struct, which was too generic to be
generally useful, we have moved to a BusEventFilter type, which
contains things we may filter on when we're searching for bus events.
At the moment it just contains names, and start/stop times.
Then in each function we can accept this filter struct and convert
it to fit the query.

We also support general modifiers, and currently have one implemented:
the LimitOffsetModifier. This adds a LIMIT and OFFSET clause to any
statement. these are all applied at the end and receive a stringbuilder
which may prevent certain operations from being structured.
We need to work on this one more, potentially abandoning.
2024-03-01 16:25:33 -06:00
saji 9a98117384 clean up dead code 2024-02-28 14:01:44 -06:00
saji d6cd4d3e26 fix tests, add packets stuff for db
Some checks failed
Go / build (push) Failing after 1m45s
2024-02-28 01:07:36 -06:00
saji 245a654164 Performance optimizations for import
note that you need to limit the number of writing threads.
2024-02-14 10:31:41 -06:00
saji a4ca71d0ad make regex precompiled
that made things fast lol
also fix error output for skylabify
2024-02-14 02:15:21 -06:00
saji 2d9d32dbf4 remove streaming db insert 2024-02-13 13:41:32 -06:00
saji 6c5162a8be wip: threaded import, doesn't work 2024-02-13 10:42:28 -06:00
saji 3ae157a3de revert busevent pointer change 2024-02-13 10:03:39 -06:00
saji 0c8a25a2f4 move parsers to internal library
many fixes related to previous changes
added import command
2024-02-12 14:38:01 -06:00
saji c4bdf122a8 major cleanup/refactor
delete mprpc
move can frame to it's own library
create CANID type (better extended id support)
rework database format, only uses name + json now
busEvent and rawJsonEvent don't store the Id anymore
2024-02-12 09:45:23 -06:00
saji 9280067d87 db migration fixes
- fix offbyone for executing migrations
- fix user_version setter not working
- add one more migration for WIP weather table
2023-07-06 15:21:41 -05:00
saji 62e162e939 set sqlite user version after migration 2023-07-06 13:46:02 -05:00
saji 969e17a169 get migrations working 2023-07-06 11:26:00 -05:00
saji d5b960ad8a wip: more db migration work 2023-07-06 00:24:05 -05:00
saji 63087deffb wip: db migration 2023-07-05 21:16:26 -05:00
saji 699cfb5e3d big update 2023-06-30 11:51:06 -05:00
Renamed from db.go (Browse further)