Skip to content
Snippets Groups Projects
Commit 1150adf2 authored by Aleksandr Lyapunov's avatar Aleksandr Lyapunov Committed by Aleksandr Lyapunov
Browse files

box: implement complex foreign keys

Implement complext foreign keys addition to field foreign keys.
They are quite similar to field foreign keys, the difference is:
* The are set in space options instead of format field definition.
* Several fields may be specified in relation.
* By design field foreign keys are more optimal.

One can set up foreign keys in space options:
box.schema.space.create(.. {.., foreign_key=<foreign_key>})
where foreign_key can be of one of the following forms:
 foreign_key={space=..,field=..}
 foreign_key={<name1>={space=..,field=..}, ..}
where field must be a table with local -> foreing fields mapping:
 field={local_field1=foreign_field1, ..}

NO_DOC=see later commits
NO_CHANGELOG=see later commits
parent d950fdde
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment