Skip to content

Commit ca0163b

Browse files
alexbiehlclaude
andcommitted
Add commentary that fixedString does not check or pad length
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 0994bd5 commit ca0163b

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/Database/ClickHouse/Value.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,11 @@ string = Value $ \text ->
153153
--
154154
-- The inner 'Data.ByteString.ByteString' is written as-is (no length prefix),
155155
-- which matches the RowBinary wire format for @FixedString@.
156+
--
157+
-- Note: this encoder does /not/ check or enforce that the byte string has
158+
-- exactly @n@ bytes, nor does it pad or truncate the value. It is the
159+
-- caller's responsibility to ensure the length matches the column's
160+
-- @FixedString(n)@ declaration.
156161
fixedString :: forall (n :: GHC.TypeLits.Nat). Value (FixedString n)
157162
fixedString = Value $ \(FixedString bs) ->
158163
Data.ByteString.Builder.byteString bs

0 commit comments

Comments
 (0)