You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,8 @@ ActiveReporting::Configuration.setting = value
142
142
143
143
`metric_lookup_class` - The name of a constant used to lookup prebuilt `Reporting::Metric` objects by name. The constant should define a class method called `#lookup` which can take a string or symbol of the metric name. (Default: `::Metric`)
144
144
145
+
`db_adapter` - Each database has a diferent way of doing the same thing on SQL. This is an abstraction layer on each database. For example `PostGreSQL` have a native `date_trunc` while `MySQL` doesn't so we do the same in another way. Make sure to chosse your database's adapter (Default: `:sqlite3`). If you want MySQL put `:mysql2` and if you want PostGreSQL put `:postgresql`.
146
+
145
147
146
148
## ActiveReporting::FactModel
147
149
@@ -219,7 +221,7 @@ class PhoneFactModel < ActiveReporting::FactModel
219
221
end
220
222
```
221
223
222
-
### Implicit hierarchies with datetime columns (PostgreSQL support only)
224
+
### Implicit hierarchies with datetime columns (PostgreSQL and MySQL support only)
223
225
224
226
The fastest approach to group by certain date metrics is to create so-called "date dimensions". For
225
227
those Postgres users that are restricted from organizing their data in this way, Postgres provides
@@ -235,7 +237,6 @@ end
235
237
236
238
When creating a metric, ActiveReporting will recognize implicit hierarchies for this dimension. The hierarchies correspond to the [values](https://www.postgresql.org/docs/8.1/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC) supported by PostgreSQL. (See example under the metric section, below.)
237
239
238
-
*NOTE*: PRs welcomed to support this functionality in other databases.
0 commit comments