Skip to content

Commit c83cde0

Browse files
Malienslvrtrn
andauthored
Refine TupleParam values type (#465)
Co-authored-by: Serge Klochkov <[email protected]>
1 parent be2eff5 commit c83cde0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44

55
- Server-side exceptions that occur in the middle of the HTTP stream are now handled correctly. This requires [ClickHouse 25.11+](https://github.com/ClickHouse/ClickHouse/pull/88818). Previous ClickHouse versions are unaffected by this change. ([#478])
66

7+
## Improvements
8+
9+
- Made `TupleParam` constructor accept a readonly array to permit more usages. ([#465], [Malien])
10+
11+
[#465]: https://github.com/ClickHouse/clickhouse-js/pull/465
712
[#478]: https://github.com/ClickHouse/clickhouse-js/pull/478
13+
[Malien]: https://github.com/Malien
814

915
# 1.12.1
1016

packages/client-common/src/data_formatter/format_query_params.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export class TupleParam {
2-
constructor(public readonly values: any[]) {}
2+
constructor(public readonly values: readonly unknown[]) {}
33
}
44

55
export function formatQueryParams({
@@ -113,7 +113,7 @@ function formatObjectLikeParam(
113113
}
114114

115115
interface FormatQueryParamsOptions {
116-
value: any
116+
value: unknown
117117
wrapStringInQuotes?: boolean
118118
// For tuples/arrays, it is required to print NULL instead of \N
119119
printNullAsKeyword?: boolean

0 commit comments

Comments
 (0)