class

Chronicle::Storage::Database

Inherits Reference < Object

SQLite storage manager providing WAL mode, indexes, and best-effort queries.

Constructors

in_memory
Source
new(uri : String = "sqlite3://#{Database.default_db_path}")
Source

Class methods

default_db_path
Source

Instance methods

active_idle_event
Source
active_window_event
Source
close
Source
close_active_idle(idle_id : Int64, ended_at : Time = Time.utc) : Nil
Source
close_active_window(window_id : Int64, ended_at : Time = Time.utc) : Nil
Source
daily_rollups_between(from_date : String, to_date : String) : Array(Models::DailyRollup)
Source
idle_events_between(from_time : Time, to_time : Time) : Array(Models::IdleEvent)
Source
insert_idle_event(event : Models::IdleEvent) : Int64

Idle event operations

Source
insert_shell_event(event : Models::ShellEvent) : Int64

Shell event operations

Source
insert_window_event(event : Models::WindowEvent) : Int64

Window event operations

Source
shell_events_between(from_time : Time, to_time : Time) : Array(Models::ShellEvent)
Source
upsert_daily_rollup(rollup : Models::DailyRollup) : Nil

Daily rollups operations

Source
window_events_between(from_time : Time, to_time : Time) : Array(Models::WindowEvent)
Source