mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
d721344280
Since CLOB data type has many limitations in Oracle SELECT WHERE clause.
35 lines
659 B
Ruby
35 lines
659 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "cases/helper"
|
|
require "cases/json_shared_test_cases"
|
|
|
|
class JsonAttributeTest < ActiveRecord::TestCase
|
|
include JSONSharedTestCases
|
|
self.use_transactional_tests = false
|
|
|
|
class JsonDataTypeOnText < ActiveRecord::Base
|
|
self.table_name = "json_data_type"
|
|
|
|
attribute :payload, :json
|
|
attribute :settings, :json
|
|
|
|
store_accessor :settings, :resolution
|
|
end
|
|
|
|
def setup
|
|
super
|
|
@connection.create_table("json_data_type") do |t|
|
|
t.string "payload"
|
|
t.string "settings"
|
|
end
|
|
end
|
|
|
|
private
|
|
def column_type
|
|
:string
|
|
end
|
|
|
|
def klass
|
|
JsonDataTypeOnText
|
|
end
|
|
end
|