We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b85924 commit b6367e2Copy full SHA for b6367e2
APP_TEMPLATE
@@ -7,11 +7,21 @@ class Profile
7
private attr_reader :options, :location
8
9
def client
10
- postgres? ? "RailsEventStore::JSONClient.new" : "RailsEventStore::Client.new"
+ if postgres? || mysql?
11
+ "RailsEventStore::JSONClient.new"
12
+ else
13
+ "RailsEventStore::Client.new"
14
+ end
15
end
16
17
def data_type
- postgres? ? "jsonb" : "binary"
18
+ if postgres?
19
+ "jsonb"
20
+ elsif mysql?
21
+ "json"
22
23
+ "binary"
24
25
26
27
def for_existing_app
@@ -24,6 +34,10 @@ class Profile
34
!!location
35
36
37
+ def mysql?
38
+ database.downcase.eql?("mysql2") || database.downcase.eql?("mysql")
39
40
+
41
def postgres?
28
42
database.downcase.eql?("postgresql")
29
43
0 commit comments