Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2019-06-13 16:12:28 +0300
committerNick Thomas <nick@gitlab.com>2019-07-23 18:53:03 +0300
commit4aa76dddecc048cef24963323afe59f1c120cb72 (patch)
tree0a15518b73ee1646d09161954cbefb577d249138 /lib/serializers
parentd892e80bf0161b535389c91ccb53539e4f08d790 (diff)
Remove dead MySQL code
None of this code can be reached any more, so it can all be removed
Diffstat (limited to 'lib/serializers')
-rw-r--r--lib/serializers/json.rb18
1 files changed, 1 insertions, 17 deletions
diff --git a/lib/serializers/json.rb b/lib/serializers/json.rb
index 93cb192087a..1ed5d5dc3f5 100644
--- a/lib/serializers/json.rb
+++ b/lib/serializers/json.rb
@@ -1,32 +1,16 @@
# frozen_string_literal: true
module Serializers
- # This serializer exports data as JSON,
- # it is designed to be used with interwork compatibility between MySQL and PostgreSQL
- # implementations, as used version of MySQL does not support native json type
- #
- # Secondly, the loader makes the resulting hash to have deep indifferent access
+ # Make the resulting hash have deep indifferent access
class JSON
class << self
def dump(obj)
- # MySQL stores data as text
- # look at ./config/initializers/ar_mysql_jsonb_support.rb
- if Gitlab::Database.mysql?
- obj = ActiveSupport::JSON.encode(obj)
- end
-
obj
end
def load(data)
return if data.nil?
- # On MySQL we store data as text
- # look at ./config/initializers/ar_mysql_jsonb_support.rb
- if Gitlab::Database.mysql?
- data = ActiveSupport::JSON.decode(data)
- end
-
Gitlab::Utils.deep_indifferent_access(data)
end
end