Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
user_guide:poly_db_write [2019/01/25 09:27] – ↷ Links adapted because of a move operation oroehrig | user_guide:howto:poly_db_write [2019/05/02 09:14] (current) – [Writing to the database] mradons | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Writing to the database ====== | ====== Writing to the database ====== | ||
- | This tutorial explains basic write and update access to the polymake database | + | This tutorial explains basic write and update access to the polymake database. See [[poly_db_tutorial|here]] for an introduction tutorial on querying the database. |
==== Write access ==== | ==== Write access ==== | ||
Line 26: | Line 26: | ||
* '' | * '' | ||
- | By default, all properties present in your object are copied in the database. For most of them it might not be interesting to filter by, so check out the [[user_guide: | + | By default, all properties present in your object are copied in the database. For most of them it might not be interesting to filter by, so check out the [[user_guide:howto: |
==== Type information ==== | ==== Type information ==== | ||
- | Collections in the database have corresponding '' | + | Collections in the database have corresponding '' |
There can be more than one type information entry for a collection. This is useful if, for some part of a collection a property should or cannot be computed or stored in the database. E.g., storing all lattice points for the nine-dimensional Fano polytopes is not feasible. | There can be more than one type information entry for a collection. This is useful if, for some part of a collection a property should or cannot be computed or stored in the database. E.g., storing all lattice points for the nine-dimensional Fano polytopes is not feasible. | ||
Line 41: | Line 41: | ||
=== Adding a new type information entry to your collection === | === Adding a new type information entry to your collection === | ||
- | To create a new type information entry, write it into a perl hash in the polymake shell, or into a JSON file (See [[devel/ | + | To create a new type information entry, write it into a perl hash in the polymake shell, or into a JSON file (See [[dev_corner: |
New type information entries are written with the command '' | New type information entries are written with the command '' | ||
Line 69: | Line 69: | ||
db_write_collection_info(file=>" | db_write_collection_info(file=>" | ||
</ | </ | ||
- | where we read the information from the files '' | + | where we read the information from the files '' |
Existing entries are updated. With the option '' | Existing entries are updated. With the option '' |