@@ -4,7 +4,7 @@ open Caqti_request.Infix
44module type CONNECTION = Mina_caqti. CONNECTION
55
66let latest_state_hash_query =
7- ( Caqti_type. unit ->! Caqti_type. string )
7+ Caqti_type. ( unit ->! string )
88 {sql|
99 SELECT state_hash from blocks order by height desc limit 1 ;
1010 | sql}
@@ -39,7 +39,7 @@ let chain_of_query =
3939 | sql}
4040
4141let is_in_best_chain_query =
42- ( Caqti_type. (t4 string string int int64 ) ->! Caqti_type. bool )
42+ Caqti_type. (t4 string string int int64 ->! bool )
4343 ( chain_of_query
4444 ^ {sql|
4545 SELECT EXISTS (
@@ -57,7 +57,7 @@ let is_in_best_chain (module Conn : CONNECTION) ~tip_hash ~check_hash
5757 (tip_hash, check_hash, check_height, check_slot)
5858
5959let num_of_confirmations_query =
60- ( Caqti_type. (t2 string int ) ->! Caqti_type. int )
60+ Caqti_type. (t2 string int ->! int )
6161 ( chain_of_query
6262 ^ {sql|
6363 SELECT count(* ) FROM chain
@@ -70,7 +70,7 @@ let num_of_confirmations (module Conn : CONNECTION) ~latest_state_hash
7070 Conn.find num_of_confirmations_query (latest_state_hash, fork_slot)
7171
7272let number_of_commands_since_block_query block_commands_table =
73- ( Caqti_type.(t2 string int) ->! Caqti_type.( t4 string int int int) )
73+ Caqti_type.(t2 string int ->! t4 string int int int)
7474 ( chain_of_query
7575 ^ Printf.sprintf
7676 {sql|
@@ -109,7 +109,7 @@ let number_of_zkapps_commands_since_block (module Conn : CONNECTION)
109109 (fork_state_hash, fork_slot)
110110
111111let last_fork_block_query =
112- ( Caqti_type.unit ->! Caqti_type.( t2 string int64) )
112+ Caqti_type.( unit ->! t2 string int64)
113113 {sql|
114114 SELECT state_hash, global_slot_since_genesis FROM blocks
115115 WHERE global_slot_since_hard_fork = 0
@@ -148,7 +148,7 @@ module SchemaVerification = struct
148148 module Queries = struct
149149 (* 1) How many of element8..element31 are missing in table ? *)
150150 let missing_cols_req =
151- ( Caqti_type.string ->! Caqti_type. int)
151+ Caqti_type.( string ->! int)
152152 @@ {|
153153 SELECT count(* ) FROM generate_series(8,31) g(n)
154154 LEFT JOIN information_schema.columns c
@@ -161,7 +161,7 @@ module SchemaVerification = struct
161161 (* 2) Row from public.schema_version for a given version.
162162 We stringify timestamps for driver simplicity. *)
163163 let schema_row_req =
164- ( Caqti_type.string ->? Caqti_type. string)
164+ Caqti_type.( string ->? string)
165165 @@ {|
166166 SELECT
167167 status
0 commit comments