type t (** An SQL identifier (table or column name). The type is abstract and implemented as a string: the only way to create a value is {!of_string}, which validates the string. A [t] is therefore always safe to embed in a quoted SQL identifier, and the query layer never manipulates raw strings for table or column names. *) exception Invalid of string (** Raised by {!of_string} when the string is not a valid identifier. *) val is_valid : string -> bool (** [is_valid s] is [true] iff [s] is a non-empty sequence of letters, digits, underscores or hyphens. In particular the double quote (which could break out of a quoted identifier) and the dot (used internally to build the names of the dedicated tables for multivalued fields) are rejected. *) val of_string : string -> t (** The only way to build an identifier. @raise Invalid if the string is not valid. *) val of_string_opt : string -> t option (** [of_string_opt s] is [Some id] if [s] is valid, [None] otherwise. *) val to_string : t -> string (** The underlying string. *) val id : t (** The [id] column: primary key of every content table. *) val parent : t (** The [parent] column: foreign key to the parent content, present in subcontent tables and in the dedicated tables of multivalued fields. *) val target : t (** The [target] column of the dedicated tables for multivalued fields. *) val quote : t -> string (** [quote id] is the SQL quoted form ["..."] of the identifier. *) val dot : t -> t -> t (** [dot a b] is the identifier ["a.b"], used for the dedicated tables of multivalued fields. Both parts are already validated and contain no dot, so the result is safe to quote as a single identifier. *) val equal : t -> t -> bool val compare : t -> t -> int val hash : t -> int val pp : Format.formatter -> t -> unit