Repodb.Field
repodb · API reference
type ('record, 'value) t = {
name : string;
ty : 'value Types.t;
get : 'record -> 'value;
set : 'value -> 'record -> 'record;
table_name : string;
primary_key : bool;
unique : bool;
nullable : bool;
default : string option;
}('record, 'value) t represents a field of type 'value in 'record.
val make :
?primary_key:bool ->
?unique:bool ->
?default:string option ->
table_name:string ->
name:string ->
ty:'a Types.t ->
get:('b -> 'a) ->
set:('a -> 'b -> 'b) ->
unit ->
('b, 'a) tval name : ('a, 'b) t -> stringval field_type : ('a, 'b) t -> 'b Types.tval qualified_name : ('a, 'b) t -> stringval get : ('a, 'b) t -> 'a -> 'bval set : ('a, 'b) t -> 'b -> 'a -> 'aval is_primary_key : ('a, 'b) t -> boolval is_unique : ('a, 'b) t -> boolval is_nullable : ('a, 'b) t -> booltype 'record field_list =
| [] : 'record field_list
| :: : ('record, 'a) t * 'record field_list -> 'record field_listval field_names : 'r. 'r field_list -> string list