Skip to content

Commit 82f80dd

Browse files
committedAug 31, 2023
Fix misnaming of internal function (pgstring_of_pdate).
1 parent 8129b02 commit 82f80dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎caqti-driver-pgx/lib/caqti_driver_pgx.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ let encode_field
9595
| Enum _ -> Pgx.Value.of_string x
9696
| Octets -> Pgx.Value.of_binary x
9797
| Pdate -> Pgx.Value.of_string (Conv.iso8601_of_pdate x)
98-
| Ptime -> Pgx.Value.of_string (pgstring_of_pdate x)
98+
| Ptime -> Pgx.Value.of_string (pgstring_of_ptime x)
9999
| Ptime_span -> Pgx.Value.of_string (pgstring_of_ptime_span x))
100100

101101
let encode_param ~uri t param =

‎caqti-driver-postgresql/lib/caqti_driver_postgresql.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ module Make_encoder (String_encoder : STRING_ENCODER) = struct
239239
| Enum _ -> encode_string x
240240
| Octets -> encode_octets x
241241
| Pdate -> Conv.iso8601_of_pdate x
242-
| Ptime -> Pg_ext.pgstring_of_pdate x
242+
| Ptime -> Pg_ext.pgstring_of_ptime x
243243
| Ptime_span -> Pg_ext.pgstring_of_ptime_span x)
244244

245245
let encode ~uri params t x =

‎shared/postgresql_conv.ml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(* Copyright (C) 2022 Petter A. Urkedal <paurkedal@gmail.com>
1+
(* Copyright (C) 2022--2023 Petter A. Urkedal <paurkedal@gmail.com>
22
*
33
* This library is free software; you can redistribute it and/or modify it
44
* under the terms of the GNU Lesser General Public License as published by
@@ -27,7 +27,7 @@ let pgstring_of_bool = function true -> "t" | false -> "f"
2727

2828
let pdate_of_pgstring = Conv.pdate_of_iso8601
2929

30-
let pgstring_of_pdate x =
30+
let pgstring_of_ptime x =
3131
Ptime.to_rfc3339 ~space:true ~tz_offset_s:0 ~frac_s:6 x
3232

3333
let pgstring_of_ptime_span t =

0 commit comments

Comments
 (0)
Please sign in to comment.