Something went wrong. Try again.
SQL frontend over the catalog engine
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041424344(*--------------------------------------------------------------------------- Copyright (c) 2026 Thomas Gazagnaire. All rights reserved. SPDX-License-Identifier: ISC ---------------------------------------------------------------------------*)
module Sort = Jsonb_sortmodule Error = Jsonb_errormodule Value = Jsonb_valuemodule Codec = Jsonb_codecmodule Cursor = Jsonb_cursor
type t = Value.t
let pp = Value.pp
type 'a codec = 'a Codec.t
let sniff = Jsonb_core.is_jsonb
let of_string_exn c s = let t = Jsonb_core.of_blob s in if Jsonb_core.validity t 0 (String.length s) 1 <> 0 then Error.fail_malformed (); Codec.dec_at c t 0
let of_string c s = match of_string_exn c s with | v -> Ok v | exception Catalog.Error e -> Error e
let to_string = Codec.to_bytes
let to_writer c v b = let t = Jsonb_core.empty 16 in Codec.enc_into c v t; Buffer.add_subbytes b t.a 0 t.n
let decode_exn = Codec.decode
let decode c v = match decode_exn c v with v -> Ok v | exception Catalog.Error e -> Error e
let encode = Codec.encode