summaryrefslogtreecommitdiff
path: root/app/models/ci/build_trace_chunks/database.rb
blob: 73cb8abf3817ed5a1577534018ccbbf2b8fe924b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# frozen_string_literal: true

module Ci
  module BuildTraceChunks
    class Database
      def available?
        true
      end

      def keys(relation)
        []
      end

      def delete_keys(keys)
        # no-op
      end

      def data(model)
        model.raw_data
      end

      def set_data(model, data)
        model.raw_data = data
      end

      def delete_data(model)
        model.update_columns(raw_data: nil) unless model.raw_data.nil?
      end
    end
  end
end