Sha256: 5421188a055d2f337331402323a6b9f37873d443ed4a70c6e364b0184753fbeb
Contents?: true
Size: 1.09 KB
Versions: 25
Compression:
Stored size: 1.09 KB
Contents
# frozen_string_literal: true module Dynflow module CoordinatorAdapters class Sequel < Abstract def initialize(world) super @sequel_adapter = world.persistence.adapter Type! @sequel_adapter, PersistenceAdapters::Sequel end def create_record(record) @sequel_adapter.insert_coordinator_record(record.to_hash) rescue Errors::PersistenceError => e if e.cause.is_a? ::Sequel::UniqueConstraintViolation raise Coordinator::DuplicateRecordError.new(record) else raise e end end def update_record(record) @sequel_adapter.update_coordinator_record(record.class.name, record.id, record.to_hash) end def delete_record(record) @sequel_adapter.delete_coordinator_record(record.class.name, record.id) end def find_records(filter_options) @sequel_adapter.find_coordinator_records(filters: filter_options) end def find_execution_plans(filter_options) @sequel_adapter.find_execution_plans(filters: filter_options) end end end end
Version data entries
25 entries across 25 versions & 1 rubygems