Class: Acta::Adapters::Postgres
- Defined in:
- lib/acta/adapters/postgres.rb
Instance Method Summary collapse
- #fetch_records ⇒ Object
- #insert_event(attributes) ⇒ Object
- #json_column_type ⇒ Object
- #uuid_column_type ⇒ Object
Methods inherited from Base
Instance Method Details
#fetch_records ⇒ Object
25 26 27 |
# File 'lib/acta/adapters/postgres.rb', line 25 def fetch_records Acta::Record.order(:id) end |
#insert_event(attributes) ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/acta/adapters/postgres.rb', line 14 def insert_event(attributes) stream_type = attributes[:stream_type] stream_key = attributes[:stream_key] if stream_type && stream_key insert_streamed(attributes, stream_type:, stream_key:) else Acta::Record.create!(**attributes) end end |
#json_column_type ⇒ Object
10 11 12 |
# File 'lib/acta/adapters/postgres.rb', line 10 def json_column_type :jsonb end |
#uuid_column_type ⇒ Object
6 7 8 |
# File 'lib/acta/adapters/postgres.rb', line 6 def uuid_column_type :uuid end |