diff --git a/node/pkg/dal/tests/stats_test.go b/node/pkg/dal/tests/stats_test.go index 8292418b3..34dfa2a78 100644 --- a/node/pkg/dal/tests/stats_test.go +++ b/node/pkg/dal/tests/stats_test.go @@ -96,7 +96,7 @@ func TestWebsocketSubcription(t *testing.T) { assert.NoError(t, err) assert.Greater(t, id, int32(0)) - err = stats.InsertWebsocketSubscription(ctx, id, "test_topic") + err = stats.InsertWebsocketSubscriptions(ctx, id, []string{"test_topic"}) assert.NoError(t, err) result, err := db.QueryRows[WebsocketSubscription](ctx, "SELECT * FROM websocket_subscriptions", nil) diff --git a/node/pkg/dal/utils/stats/stats.go b/node/pkg/dal/utils/stats/stats.go index a859f41d9..8116be806 100644 --- a/node/pkg/dal/utils/stats/stats.go +++ b/node/pkg/dal/utils/stats/stats.go @@ -25,12 +25,6 @@ const ( SET connection_end = NOW(), duration = EXTRACT(EPOCH FROM (NOW() - timestamp)) * 1000 WHERE id = @id; ` - - INSERT_WEBSOCKET_SUBSCRIPTIONS = ` - INSERT INTO - websocket_subscriptions (connection_id, topic) - VALUES (@connection_id, @topic); - ` ) type websocketId struct { @@ -64,13 +58,6 @@ func UpdateWebsocketConnection(ctx context.Context, connectionId int32) error { }) } -func InsertWebsocketSubscription(ctx context.Context, connectionId int32, topic string) error { - return db.QueryWithoutResult(ctx, INSERT_WEBSOCKET_SUBSCRIPTIONS, map[string]any{ - "connection_id": connectionId, - "topic": topic, - }) -} - func InsertWebsocketSubscriptions(ctx context.Context, connectionId int32, topics []string) error { entries := [][]any{} for _, topic := range topics {