chore(release): version cnosdb-client - #52
Open
AayushMainali-Github wants to merge 1 commit into
Open
Conversation
AayushMainali-Github
force-pushed
the
changeset-release/main
branch
2 times, most recently
from
July 25, 2026 04:32
07352f6 to
5ab2de8
Compare
AayushMainali-Github
force-pushed
the
changeset-release/main
branch
from
July 25, 2026 04:36
5ab2de8 to
ab85433
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
cnosdb-client@0.3.0
Minor Changes
#56
d784699Thanks @AayushMainali-Github! - Addsql, a tagged template that escapes interpolated values as CnosDB SQL literals. Strings use SQL-standard quote doubling,null/boolean/number/bigint/Datehave fixed encodings, and anything else — includingNaN,Infinity, and invalid dates — throws rather than guessing. Identifiers and statement structure stay in the literal parts of the template; this is a value escaper, not a query builder.#55
f183f3bThanks @AayushMainali-Github! - AddqueryStream(), an async generator that yields query rows as they arrive instead of buffering the whole response. It asks CnosDB forchunked=true, which replies with successive JSON arrays written back to back; the client parses each array and yields its elements so memory stays proportional to one server batch.Row shape matches
query()(alphabetically sorted keys, NULL columns omitted). SQL errors still arrive as an HTTP error before any row is sent; a failure after some rows have been yielded throws and leaves those rows consumed, so a partial result is visible rather than hidden. Breaking out of the loop or abortingoptions.signalcancels the underlying response.#54
94cd075Thanks @AayushMainali-Github! - Add an opt-inretrypolicy. Retries stay off unless configured, so the default remains one call, one request; enabling them retriesping,query, andqueryTableon timeouts, connection failures, HTTP 429, and 5xx other than 501. Writes are retried only withretryWrites, andexecuteis never retried, because the client cannot tell whether a failed attempt took effect.Backoff doubles from
backoff.initialMsup tobackoff.maxMswith full jitter by default, aRetry-Afterheader overrides the computed delay within that cap, and anAbortSignalends the sequence immediately including mid-backoff.timeoutMskeeps its existing meaning as the budget for a single attempt rather than becoming a deadline across the sequence;retry.maxElapsedMsbounds the total. The reasoning, and the amendment to ADR-0006, are recorded in ADR-0009.#51
6340578Thanks @AayushMainali-Github! - Addclient.queryTable(), which returns a result's columns alongside its rows. It requests CSV, the only CnosDB response format that carries column names in their true order, so the columns come back in the order the statement selected them and every row has exactly one value per column. On CnosDB 2.4.3 the columns survive an empty result, so a table with no matching rows can still be rendered with its headings; 2.4.1 returns an empty body instead and reports no columns.This matters because the JSON format used by
query()sorts keys alphabetically and omits any column that is NULL for a given row, which makes row objects differ in shape and hides nulls entirely. Both behaviours are now documented indocs/compatibility.md.Values are returned as raw strings, because CnosDB sends no column types over HTTP in any response format; converting them would mean guessing.
Also exports the
Compressiontype from the package root, which was added as a client option in 0.2.0 but was not importable.#53
2ef8eeaThanks @AayushMainali-Github! - AddsplitPoints(), a generator that cuts a batch of points into Line Protocol payloads no larger than a chosen size. Sizing is by encoded UTF-8 bytes rather than point count, since points vary enormously in encoded length and server limits are measured in bytes; the separating newlines are counted too, so a payload that fits also fits on the wire.Splitting is opt-in with no default size, so existing writes are unchanged. A single point larger than
maxBytesraises aRangeErrornaming its index and size rather than emitting an oversized payload.Sending the chunks is left to the caller, so a failure part way through a batch makes it obvious which chunks were already written.