Declarative CSV codecs
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pus: rename test_ functions, fix service_type doc (merlint E330/E410)

+8 -7
+1 -2
fuzz/fuzz_csvt.ml
··· 221 221 let suite = 222 222 ( "csvt", 223 223 [ 224 - test_case "no crash on arbitrary" [ bytes ] 225 - test_no_crash_arbitrary; 224 + test_case "no crash on arbitrary" [ bytes ] test_no_crash_arbitrary; 226 225 test_case "int roundtrip" [ int ] test_int_roundtrip; 227 226 test_case "float roundtrip" [ float ] test_float_roundtrip; 228 227 test_case "bool roundtrip" [ bool ] test_bool_roundtrip;
+7 -5
lib/csvt.mli
··· 77 77 [false]. *) 78 78 79 79 val nullable_float : float t 80 - (** [nullable_float] is like {!float} but treats ["NULL"] and empty strings as [nan]. *) 80 + (** [nullable_float] is like {!float} but treats ["NULL"] and empty strings as 81 + [nan]. *) 81 82 82 83 val nullable_int : int t 83 - (** [nullable_int] is like {!int} but treats ["NULL"] and empty strings as [-1]. *) 84 + (** [nullable_int] is like {!int} but treats ["NULL"] and empty strings as [-1]. 85 + *) 84 86 85 87 val option : 'a t -> 'a option t 86 88 (** [option t] treats ["NULL"] and empty strings as [None], otherwise decodes ··· 105 107 (** {1:query Query} *) 106 108 107 109 val col : string -> 'a t -> 'a t 108 - (** [col name t] creates a single-column row codec that extracts column 109 - [name] decoded with [t]. Useful for projecting a single column from a CSV 110 - file without defining a full row type. *) 110 + (** [col name t] creates a single-column row codec that extracts column [name] 111 + decoded with [t]. Useful for projecting a single column from a CSV file 112 + without defining a full row type. *) 111 113 112 114 (** {1:row Row Builder} *) 113 115