Class: Rack::WebProfiler::Model
- Inherits:
-
Object
- Object
- Rack::WebProfiler::Model
- Defined in:
- lib/rack/web_profiler/model.rb
Overview
Model
Defined Under Namespace
Classes: CollectionRecord
Class Method Summary collapse
-
.clean! ⇒ Object
Remove the database content.
-
.database ⇒ Sequel::SQLite::Database
Get the WebProfiler database.
Class Method Details
.clean! ⇒ Object
Remove the database content.
22 23 24 25 26 27 28 |
# File 'lib/rack/web_profiler/model.rb', line 22 def clean! return unless ::File.exist?(db_file_path) ::File.delete(db_file_path) @db = nil @db_file_path = nil end |
.database ⇒ Sequel::SQLite::Database
Get the WebProfiler database.
11 12 13 14 15 16 17 18 19 |
# File 'lib/rack/web_profiler/model.rb', line 11 def database @db ||= Sequel.connect("sqlite://#{db_file_path}", { single_threaded: true, # timeout: 5000, # # single_threaded: true, # = mieux # pool_timeout: 5000, # max_connections: 1, }) end |