Skip to content

Commit

Permalink
fix(connector): pass sql args to list events (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike authored Nov 13, 2023
1 parent 36f6c12 commit 842f679
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/streaming/clickhouse_connector/connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ func (c *ClickhouseConnector) queryEventsTable(ctx context.Context, namespace st
Limit: params.Limit,
}

sql, _, err := table.toSQL()
sql, args, err := table.toSQL()
if err != nil {
return nil, fmt.Errorf("query events table to sql: %w", err)
}
rows, err := c.config.ClickHouse.Query(ctx, sql)
rows, err := c.config.ClickHouse.Query(ctx, sql, args...)
if err != nil {
if strings.Contains(err.Error(), "code: 60") {
return nil, &models.NamespaceNotFoundError{Namespace: namespace}
Expand Down

0 comments on commit 842f679

Please sign in to comment.