skaidb 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d5792e9877643c116649c834851fc097027b72fd01ab0f40920dd4e99d977a0d
4
+ data.tar.gz: 6d035367f1b2f97b6f49306ef5ff6b77974a2825e73356740d66237e2577a1d1
5
+ SHA512:
6
+ metadata.gz: e2aec63bcdd3ef8d199d223c7de91343370dceaea32fd626b1cb085606d533c613909d3653e60a662e1874f0293ebc9c6c3633f931d39f1ea569970668867e63
7
+ data.tar.gz: 3b4e1accd06da21f72da0148e3340bee4eeb1dbe3fbc98c51ce9b0d9891b6075a653c6386258582cadf8b3d49de8f596713e562213bd29c471c78c18865946e5
data/CHANGELOG.md ADDED
@@ -0,0 +1,122 @@
1
+ # Changelog
2
+
3
+ All notable changes to the skaidb Ruby driver. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
5
+ [Semantic Versioning](https://semver.org/).
6
+
7
+ ## [1.0.3] - 2026-09-20
8
+
9
+ Release automation: published from GitHub Actions. No code change.
10
+
11
+ ### Changed
12
+ - The gemspec no longer sets `rubygems_mfa_required`: rubygems.org refused
13
+ the 1.0.2 push with "Rubygem requires owners to enable MFA" because the
14
+ account behind the CI key has no MFA yet. Put it back once MFA ("UI and
15
+ gem signin") is enabled on that account.
16
+ - `publish.yml` turns a refused push into an actionable error (MFA to
17
+ enable, or a key without the push scope) instead of a bare exit code.
18
+
19
+ ## [1.0.2] - 2026-09-20
20
+
21
+ Tagged but never published: rubygems.org refused the push (see 1.0.3), so
22
+ there is no gem and no GitHub Release for this tag. Superseded by 1.0.3.
23
+
24
+ ### Changed
25
+ - A `v*` tag pushed to GitHub publishes that version by itself
26
+ (`.github/workflows/publish.yml`, GitHub-hosted runner): tests, the
27
+ tag-equals-`Skaidb::VERSION` check, `gem build`, `gem push` to RubyGems.org
28
+ with the `RUBYGEMS_API_KEY` repository secret, then the GitHub Release with
29
+ the `.gem` attached. Without the secret the push is skipped with a notice;
30
+ a version rubygems.org already lists is skipped too, so re-running a tag's
31
+ workflow is safe.
32
+
33
+ ## [1.0.1] - 2026-09-20
34
+
35
+ Published to RubyGems.org as [`skaidb`](https://rubygems.org/gems/skaidb).
36
+ Install instructions only; no code change.
37
+
38
+ ### Changed
39
+ - Install: `gem install skaidb`, or `gem "skaidb", "~> 1.0"` in a Gemfile.
40
+ The README, `docs/getting-started.md` and the release notes no longer
41
+ point at the GitHub release asset or the git tag as the install channel;
42
+ the built `.gem` stays attached to every GitHub release.
43
+
44
+ ## [1.0.0] - 2026-09-20
45
+
46
+ First release as a standalone repository
47
+ (`github.com/porcupin26/skaidb-ruby`), carrying its full history over from
48
+ the skaidb monorepo. The version series restarts at 1.0.0. This is also the
49
+ first release verified end to end against a live skaidb server (connect,
50
+ DDL, typed inserts of every value type, bound `SELECT`, `UPDATE` counts,
51
+ batches, a 2 500-row stream, error handling, and the `drivers` table showing
52
+ `ruby / 1.0.0`).
53
+
54
+ ### Added
55
+ - `Skaidb::Uuid`: a value wrapper so a UUID can be bound with the Uuid type
56
+ tag (`Skaidb::Uuid.new(str)`, `.random`, `.from_bytes`); results still
57
+ decode to the canonical String, and a `Uuid` compares equal to it.
58
+ - Typed binding of `BigDecimal` (Decimal, exact 128-bit mantissa + scale)
59
+ and of binary Strings (`Encoding::BINARY` → Bytes) on the prepared path.
60
+ Before, a `BigDecimal` parameter raised `cannot bind value of type
61
+ BigDecimal` and raw bytes were sent as a String.
62
+ - `Symbol` parameters bind as String.
63
+ - Unit tests with an in-process fake server (framing, SCRAM-SHA-256,
64
+ Hello, the value codec for every type, prepare/execute with typed
65
+ parameters, `exec_batch`, streaming chunks including the abandon/drain
66
+ rule, multi-set replies, failover, reconnect, the pool, `subscribe`), a
67
+ Hello-version-equals-package-version check, and a live end-to-end test
68
+ (`test/live/`, opt-in with `SKAIDB_LIVE=1`, skipped otherwise).
69
+ - CI on Ruby 3.1, 3.2, 3.3 and 3.4; a publish workflow on `v*` tags that
70
+ gates on tag == version, attaches the built gem to a GitHub Release and
71
+ pushes to RubyGems.org only when `RUBYGEMS_API_KEY` is configured.
72
+ - Documentation: README plus `docs/` (getting started, API reference,
73
+ types, TLS, streaming, pooling) and runnable `examples/`.
74
+ - `LICENSE` (SSPL-1.0), `CHANGELOG.md`, `Rakefile`, `.gitignore`.
75
+
76
+ ### Fixed
77
+ - README: the Examples section claimed every script takes `host port user
78
+ password [database]`; `tls.rb` takes `[ca.crt]` instead of a database and
79
+ `subscribe.rb` takes a further `[stream]`. Each script's arguments are now
80
+ listed.
81
+ - `Time` parameters were converted to milliseconds through `Float`
82
+ (`to_f * 1000`), which can be off by one millisecond for some instants;
83
+ the conversion is now exact (`Rational`) and truncates towards negative
84
+ infinity, so a decoded Timestamp equals the bound one.
85
+ - An `Integer` outside the signed 64-bit range raised a raw `RangeError`
86
+ from `pack`; it now raises `Skaidb::QueryError` naming the limit.
87
+ - When the server refused to prepare a statement and the client-side
88
+ fallback could not render a parameter (an Array or a Hash), the error was
89
+ `cannot bind value of type Array`, hiding the real cause — usually a SQL
90
+ mistake such as a reserved word used as a column name. The server's reason
91
+ for the refusal is now appended to that error.
92
+ - A bare `?` in a statement that has parameters was sent to the server as
93
+ a placeholder and failed late with `statement expects N parameters, got
94
+ 0`; it is now rejected before anything is sent, with a message saying the
95
+ driver's placeholders are `$1, $2, …`.
96
+ - The frame read buffer is created as a binary String, so appending socket
97
+ bytes can never trigger an encoding conversion.
98
+ - On the prepared path (`exec_params`, `exec_batch`) a parameter that no
99
+ `$N` placeholder referenced was dropped silently: `exec_params("… WHERE
100
+ id = $1", [1, "extra"])` ran, and a batch row one value too long was
101
+ truncated to the placeholders and applied. Both now raise `QueryError`
102
+ (`more parameters (N) than placeholders ($M)`) before anything is sent,
103
+ as the text path always did.
104
+ - Documentation: a Document result's `Hash` keys arrive in the order the
105
+ server sends them (it stores documents with keys sorted at every level),
106
+ not in binding order as the type tables claimed; the Install section says
107
+ that Bundler compiles `bigdecimal` from RubyGems.org, which needs the Ruby
108
+ headers and a C toolchain.
109
+
110
+ ### Changed
111
+ - The version is defined once, as `Skaidb::VERSION` in `lib/skaidb.rb`; the
112
+ gemspec reads it and the Hello frame carries it, and CI asserts both.
113
+ - Gem metadata: homepage, source, changelog, documentation and bug-tracker
114
+ URLs point at this repository; license `SSPL-1.0`; `LICENSE` and
115
+ `CHANGELOG.md` ship in the gem; `bigdecimal` is declared as a dependency
116
+ because it is a bundled gem since Ruby 3.4.
117
+ - The example moved to `examples/basic.rb`.
118
+
119
+ [1.0.3]: https://github.com/porcupin26/skaidb-ruby/compare/v1.0.2...v1.0.3
120
+ [1.0.2]: https://github.com/porcupin26/skaidb-ruby/compare/v1.0.1...v1.0.2
121
+ [1.0.1]: https://github.com/porcupin26/skaidb-ruby/compare/v1.0.0...v1.0.1
122
+ [1.0.0]: https://github.com/porcupin26/skaidb-ruby/releases/tag/v1.0.0