Module Ask.Index

Table index descriptions.

FIXME This is not as expressive as it could be.

Indexes

type 'r t

The type for indexes on a table with rows represented by 'r.

val v : ?unique:bool -> ?name:string -> 'r Col.v list -> 'r t

index cols ~name ~unique is an index named name on columns col. If name is None a name is derived at index creation time from the table and column names. If unique is true (defaults to false) a UNIQUE constraint is added.

val unique : 'r t -> bool

unique i is true if the values in index i must be unique.

val name : 'r t -> string option

name i is the name of i.

val cols : 'r t -> 'r Col.v list

cols i are the columns indexed by i.