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
.prepare("SELECT id FROM channels WHERE creator = {}")
30
+
.prepare("SELECT id FROM channels WHERE creator = $1")
31
31
.await
32
32
{
33
33
Ok(stmt) => match connection.query(&stmt,&[creator]).await{
@@ -81,7 +81,7 @@ pub async fn get_analytics(
81
81
));
82
82
83
83
format!(
84
-
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time from event_aggregates",
84
+
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time",
85
85
query.metric, interval
86
86
)
87
87
}
@@ -99,7 +99,7 @@ pub async fn get_analytics(
99
99
where_clauses.push("earner IS NULL".to_string());
100
100
101
101
format!(
102
-
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time from event_aggregates",
102
+
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time",
103
103
query.metric, interval
104
104
)
105
105
}
@@ -119,26 +119,20 @@ pub async fn get_analytics(
119
119
session.uid
120
120
));
121
121
122
-
123
-
// where_clauses.push(format!(
124
-
// "events->'{}'->'{}'->'{}' IS NOT NULL",
125
-
// query.event_type, query.metric, session.uid
126
-
// ));
127
-
128
122
format!(
129
-
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time from event_aggregates",
123
+
"SUM({}::numeric)::varchar as value, (extract(epoch from created) - (MOD( CAST (extract(epoch from created) AS NUMERIC), {}))) as time",
Copy file name to clipboardExpand all lines: sentry/src/lib.rs
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,7 @@ lazy_static! {
57
57
static ref CHANNEL_EVENTS_AGGREGATES:Regex = Regex::new(r"^/channel/0x([a-zA-Z0-9]{64})/events-aggregates/?$").expect("The regex should be valid");
58
58
static ref ANALYTICS_BY_CHANNEL_ID:Regex = Regex::new(r"^/analytics/0x([a-zA-Z0-9]{64})/?$").expect("The regex should be valid");
59
59
static ref ADVERTISER_ANALYTICS_BY_CHANNEL_ID:Regex = Regex::new(r"^/analytics/for-advertiser/0x([a-zA-Z0-9]{64})/?$").expect("The regex should be valid");
60
+
static ref PUBLISHER_ANALYTICS_BY_CHANNEL_ID:Regex = Regex::new(r"^/analytics/for-publisher/0x([a-zA-Z0-9]{64})/?$").expect("The regex should be valid");
60
61
static ref CREATE_EVENTS_BY_CHANNEL_ID:Regex = Regex::new(r"^/channel/0x([a-zA-Z0-9]{64})/events(/.*)?$").expect("The regex should be valid");
0 commit comments