Skip to content

Commit

Permalink
Explain composite primary key
Browse files Browse the repository at this point in the history
  • Loading branch information
gvx committed Jan 20, 2021
1 parent bc76b94 commit 7935cac
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/source/wurm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ type for each column has to be one of the following:

Using :samp:`Primary[{T}]` as a type annotation in a table definition
is equivalent to using :samp:`{T}`, except that the column will be
the primary key.
part of the primary key. If multiple fields on a single table
definition are annotated in this way, their columns form a composite
primary key together.

If you attempt change the database in a way that would cause two
rows to share a primary key, the operation is rolled back, and a
Expand Down

0 comments on commit 7935cac

Please sign in to comment.