Last 12 weeks · 0 commits
2 of 6 standards met
Versions: waddler 0.1.1 (latest stable) and 0.2.0-f2882bd, dialect. Two interpolations produce parameters that ClickHouse rejects or misreads at execution time: Output: : bound as holding the ISO-8601 form (). With ClickHouse's default , comparing that against a / column fails to parse — the basic parser accepts , not the / form. Expected: bind as in format (a UTC-normalized would make timezone handling deterministic too). Empty array:** the declared/inferred element type is dropped and the placeholder becomes with an array value, which the server rejects (). A non-empty array () correctly emits , so the empty case is an inconsistency rather than a design choice. Expected: keep — an empty is valid and simply matches nothing.
Versions: waddler 0.1.1 (latest stable) and 0.2.0-f2882bd, dialect. The explicit argument of is overridden by type inference from the JS value — and the rule inverts between scalars and arrays, so there is no consistent way to bind a : Output: For scalar numbers the declared type loses to inference ( → , → for whole numbers), while for arrays* number elements keep the declared type but string elements lose it ( → ). Consequences: overflows for any value ≥ 2^31 — a id or counter cannot be bound as a number at all. A whole-number (e.g. ) is sent as , mistyping comparisons against columns. The scalar workaround (pass a decimal string) is the exact thing that breaks the array case, so callers need to know the internal inference rules to use the API safely. Expected:* an explicitly passed always wins; inference applies only when is omitted.
Versions:* waddler 0.1.1 (latest stable) and 0.2.0-f2882bd, dialect. Also reproduces on other dialects sharing . wraps the name in backticks without escaping backticks inside the name: Output: The first embedded backtick terminates the quoted identifier, and everything after it is parsed as SQL. Since is the documented way to interpolate dynamic names, an identifier that arrives from configuration or user input becomes an injection vector — the one thing the tagged template otherwise prevents. Expected:* either escape ` `sql.valuessqlwaddler/clickhousewaddler({ connection: ... })`.
Waddler requires @clickhouse/client to work even when using standalone SQL If i want to use @clickhouse/client-web i have to install both dependencies. I want to be able to use without installing extra dependencies. That way, I can create a shared package that leverages Waddler for SQL statement construction, while leaving the choice open to use either drivers, another driver, or no driver at all—just Waddler for building queries.
Repository: drizzle-team/waddler. Description: Modern SQL client Stars: 366, Forks: 11. Primary language: TypeScript. Languages: TypeScript (99.5%), JavaScript (0.5%). License: Apache-2.0. Homepage: https://waddler.drizzle.team Topics: duckdb, javascript, motherduck, nodejs, sql, typescript. Latest release: 0.1.1 (1y ago). Open PRs: 3, open issues: 9. Last activity: 10mo ago. Community health: 50%. Top contributors: OleksiiKH0240, AndriiSherman, AlexBlokh, Sukairo-02.