00:00
<
mbj >
dkubb: I need to handle it, yeah!
00:00
<
mbj >
will go to sleep now, cu later
00:00
mbj has quit [Quit: leaving]
02:35
snusnu has quit [Quit: Leaving.]
04:04
zombor_ has quit [Remote host closed the connection]
04:52
rsim has joined #datamapper
04:57
rsim has quit [Ping timeout: 240 seconds]
06:23
dkubb has joined #datamapper
07:23
dkubb has quit [Quit: Leaving...]
08:54
rsim has joined #datamapper
08:59
rsim has quit [Ping timeout: 241 seconds]
09:55
mbj has joined #datamapper
10:12
mbj_ has joined #datamapper
10:15
mbj has quit [Ping timeout: 260 seconds]
11:55
mbj_ is now known as mbj
12:57
snusnu has joined #datamapper
13:00
postmodern has quit [Quit: Leaving]
13:15
didlix_ is now known as didlix
13:19
zombor has joined #datamapper
13:19
zombor has joined #datamapper
13:19
zombor has quit [Changing host]
13:22
zombor has quit [Remote host closed the connection]
13:26
rsim has joined #datamapper
13:30
zombor has joined #datamapper
13:31
rsim has quit [Ping timeout: 240 seconds]
13:52
hansli has joined #datamapper
14:00
<
hansli >
hi. are there issues with ARM and gem install data_mapper?
14:09
hansli has quit [Quit: Page closed]
14:11
hansli has joined #datamapper
14:11
hansli has quit [Client Quit]
14:27
rsim has joined #datamapper
14:31
rsim has quit [Ping timeout: 241 seconds]
15:07
rsim has joined #datamapper
15:32
solnic has joined #datamapper
16:12
rsim has quit [Quit: Leaving.]
16:26
solnic has quit [Quit: Leaving...]
16:42
rsim has joined #datamapper
16:46
rsim has quit [Ping timeout: 240 seconds]
17:12
PolarFox has quit [Quit: leaving]
17:15
rsim has joined #datamapper
17:41
v0n has joined #datamapper
17:49
zombor has quit [Remote host closed the connection]
18:20
zombor has joined #datamapper
18:20
zombor has joined #datamapper
18:20
zombor has quit [Changing host]
18:29
zombor has quit [Ping timeout: 256 seconds]
18:35
markalanevans has joined #datamapper
18:35
<
markalanevans >
Hey folks, i'm trying to do a group by count
18:35
<
markalanevans >
For ex:
18:35
<
markalanevans >
SELECT count(*)
18:35
<
markalanevans >
FROM product_comparrisons pc
18:35
<
markalanevans >
WHERE pc.created_at >= #{from} AND pc.created_at < #{to} AND NOT (pc.upc IS NULL)
18:35
<
markalanevans >
GROUP by pc.app_id
18:36
<
markalanevans >
where to and from params that i would pass into a function
18:37
<
markalanevans >
The docs for grouping are kinda vaque
18:37
<
markalanevans >
I started to go down a route using: repository.adapter.query
18:38
<
markalanevans >
but there is now docs on that, just stack overflow mentions
18:38
<
markalanevans >
and so i'm not sure about how to go about using that concept witha method in my model of which I can pass params.
18:38
<
markalanevans >
the to / from params.
18:55
zombor has joined #datamapper
18:55
zombor has joined #datamapper
18:55
zombor has quit [Changing host]
19:01
zombor has quit [Ping timeout: 264 seconds]
19:56
zombor has joined #datamapper
19:56
zombor has quit [Changing host]
19:56
zombor has joined #datamapper
20:01
zombor has quit [Ping timeout: 264 seconds]
20:04
rsim has quit [Quit: Leaving.]
20:10
v0n has quit [Ping timeout: 260 seconds]
20:56
zombor has joined #datamapper
21:01
zombor has quit [Ping timeout: 246 seconds]
21:05
rsim has joined #datamapper
21:19
rsim has quit [Ping timeout: 240 seconds]
21:48
<
markalanevans >
How do i do group by and counts ?
22:23
<
markalanevans >
How do you do a group by in Datamapper?
22:25
<
mbj >
markalanevans: dm-aggregates might do the job
22:25
<
mbj >
But AFAIK your use case is not possible with plain dm-1, sorry.
22:25
<
mbj >
dm-2 AKA rom will feature this stuff.
22:25
<
markalanevans >
mbj: ok. So thats fine, but what do they suggest we do ?
22:26
<
markalanevans >
how do i still use the datamapper object or model to write my own custom queries?
22:26
<
markalanevans >
I need to select count(*) and group by, and then i need to sum up the totals of those grouped.
22:29
<
mbj >
markalanevans: Define a view, and a readonly model, helps you?
22:29
<
mbj >
markalanevans: So you could query that view.
22:30
<
mbj >
markalanevans: But look into dm-aggregates, it maybe allows your grouping!
22:30
<
mbj >
Never used all of its features.
22:30
<
markalanevans >
Ok. Ill check that first, but the view idea might work also
22:57
PolarFox has joined #datamapper
23:17
postmodern has joined #datamapper
23:17
zombor has joined #datamapper
23:17
zombor has joined #datamapper
23:17
zombor has quit [Changing host]
23:47
zombor has quit [Remote host closed the connection]
23:49
v0n has joined #datamapper