Skip to content

Commit 7526ab2

Browse files
ts-codecs
1 parent e096409 commit 7526ab2

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

modules/module-postgres-storage/src/storage/PostgresReportStorageFactory.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ export class PostgresReportStorageFactory implements storage.ReportStorageFactor
132132
sdk_versions_array AS (
133133
SELECT
134134
sdk,
135-
COUNT(*) AS total,
136135
COUNT(DISTINCT client_id) AS clients,
137136
COUNT(DISTINCT user_id) AS users
138137
FROM
@@ -183,7 +182,6 @@ export class PostgresReportStorageFactory implements storage.ReportStorageFactor
183182
sdk_versions_array AS (
184183
SELECT
185184
sdk,
186-
COUNT(*) AS total,
187185
COUNT(DISTINCT client_id) AS clients,
188186
COUNT(DISTINCT user_id) AS users
189187
FROM

modules/module-postgres-storage/src/types/models/SdkReporting.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
import * as t from 'ts-codec';
22
import { bigint, jsonb } from '../codecs.js';
33

4+
export const Sdks = t.object({
5+
sdk: t.string,
6+
clients: t.number,
7+
users: t.number
8+
});
9+
410
export const SdkReporting = t.object({
511
users: bigint,
612
sdks: t.object({
7-
data: jsonb(t.record(t.string))
13+
data: jsonb(t.array(Sdks))
814
})
915
});
1016

0 commit comments

Comments
 (0)