Ein komplettes Beispiel finden Sie unter Administration / XML-Importer.
1: 2: 3: 4: 5: 6: 7: 8: | <import-definition xmlns="http://schema.programmfabrik.de/import-definition/0.1"> <actions> <insert/> <update/> </actions> <table name="bilder"> </table> </import-definition> |
actions
1: 2: 3: 4: 5: | <actions> <insert/> <update/> <delete/> </actions> |
1: 2: 3: | <actions> <empty/> </actions> |
table
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: | <table name="bilder"> <!-- optional --> <actions> </actions> <!-- optional --> <restrict-import> </restrict-import> <!-- mandatory --> <unique-keys> </unique-keys> <!-- optional --> <lookups> </lookups> <!-- optional --> <filter-columns-input> </filter-columns-input> <!-- optional --> <filter-columns-output> </filter-columns-output> <!-- optional --> <extra-columns> </extra-columns> <!-- optional --> <belongs-tos> </belongs-tos> </table> |
1: 2: 3: | <table name="bilder"> <skip/> </table> |
restrict-import
1: 2: 3: 4: 5: | <restrict-import> <column name="note" value="bla"/> <column name="lk_gnarg_id"><null/></column> <column name="lk_gnubbel_id"><not-null/></column> </restrict-import> |
unique-keys
1: 2: 3: 4: 5: 6: | <unique-keys> <unique-key> <column name="group_index"/> <column name="item_index"/> </unique-key> </unique-keys> |
lookups
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: | <lookups> <lookup other-table="pool"> <other-column name="ref_id"> <input-column name="pool_ref_id"/> </other-column> <set-column name="pool_id"> <other-column name="id"/> </set-column> </lookup> </lookups> |
filter-columns-input
1: 2: 3: 4: | <filter-columns-input> <filter-column name="blarg_id"/> <filter-column negative-regex="^tmp_"/> </filter-columns-input> |
filter-columns-output
1: 2: 3: 4: | <filter-columns-output> <filter-column name="pool_ref_id"/> <filter-column negative-regex="^tmp_"/> </filter-columns-output> |
include-columns-input
(in der nächsten imexporter-Version) Für die Tabelle werden nur die ausgewählten Spalten als Eingabespalten verwendet.
1: 2: 3: 4: | <include-columns-input> <include-column name="eas_id"/> <include-column regex="^[^:]*$"/> </include-columns-input> |
include-columns-output
(in der nächsten imexporter-Version) Für die Tabelle werden nur die ausgewählten Spalten als Ausgabespalten verwendet.
1: 2: 3: 4: | <include-columns-output> <include-column name="eas_id"/> <include-column regex="^[^:]*$"/> </include-columns-output> |
extra-columns
1: 2: 3: | <extra-columns> <extra-column name="pool_ref_id" type="bigint"/> </extra-columns> |
belongs-tos
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: | <belongs-tos> <belongs-to other-table="bilder"> <columns> <column name="bilder_id"/> </columns> <actions> <replace/> </actions> </belongs-to> </belongs-tos> |