93
|
1 |
SELECT "------------------------------------" AS " ";
|
|
2 |
SELECT "castoragedb_variant - BEGIN" AS " ";
|
|
3 |
|
|
4 |
{% for col in range(feat_tree.CaStorageDbSetting.Collections._value|length) -%}
|
|
5 |
{%- set Name = feat_tree.CaStorageDbSetting.Collections.Name._value[col] or '' -%}
|
|
6 |
{%- set GroupName = feat_tree.CaStorageDbSetting.Collections.GroupName._value[col] or '' -%}
|
|
7 |
{%- set Flags = feat_tree.CaStorageDbSetting.Collections.Flags._value[col] or '' -%}
|
|
8 |
{%- set LocName = feat_tree.CaStorageDbSetting.Collections.LocName._value[col] or ''-%}
|
94
|
9 |
{%- set IconFileName = feat_tree.CaStorageDbSetting.Collections.IconFileName._value[col] or '' -%}
|
|
10 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.Collections.IconSkinId._value[col] or '' -%}
|
|
11 |
INSERT INTO COLLECTION (COLLECTION_NAME, COL_APP_GROUP_NAME, FLAGS {% if LocName -%}, COL_LOCNAME{%- endif %}{% if IconFileName -%}, ICON_FILENAME{%- endif %}{% if IconSkinId -%}, ICON_SKIN_ID{%- endif %})
|
|
12 |
VALUES ( '{{Name}}', '{{GroupName}}', {{Flags}} {% if LocName -%}, "{{LocName}}"{%- endif %}{% if IconFileName -%}, "{{IconFileName}}"{%- endif %}{% if IconSkinId -%}, "{{IconSkinId}}"{%- endif %});
|
93
|
13 |
|
|
14 |
{% endfor %}
|
|
15 |
|
|
16 |
{% for index in range(feat_tree.CaStorageDbSetting.Items._value|length) -%}
|
|
17 |
{%- set Type = feat_tree.CaStorageDbSetting.Items.Type._value[index] or '' -%}
|
|
18 |
{%- set Name = feat_tree.CaStorageDbSetting.Items.Name._value[index] or '' -%}
|
94
|
19 |
{%- set IconFileName = feat_tree.CaStorageDbSetting.Items.IconFileName._value[index] or '' -%}
|
|
20 |
{%- set IconSkinId = feat_tree.CaStorageDbSetting.Items.IconSkinId._value[index] or '' -%}
|
|
21 |
{%- set DestinationUid = feat_tree.CaStorageDbSetting.Items.DestinationUid._value[index] or '' -%}
|
|
22 |
{%- set DestinationUrl = feat_tree.CaStorageDbSetting.Items.DestinationUrl._value[index] or '' -%}
|
|
23 |
{%- set DestinationWidgetUri = feat_tree.CaStorageDbSetting.Items.DestinationWidgetUri._value[index] or '' -%}
|
93
|
24 |
{%- set Collection = feat_tree.CaStorageDbSetting.Items.Col_Name._value[index] or '' -%}
|
94
|
25 |
{% if Type == "application" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, COLLECTION_NAME)
|
|
26 |
VALUES ("{{Type}}", '{{Name}}', {{DestinationUid}}, '{{Collection}}' );{%- endif %}
|
|
27 |
{% if Type == "url" -%} INSERT INTO ITEM_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ITEM_DEST, ICON_FILENAME, ICON_SKIN_ID, COLLECTION_NAME)
|
|
28 |
VALUES ("{{Type}}", '{{Name}}', "{{DestinationUrl}}", "{{IconFileName}}", "{{IconSkinId}}", '{{Collection}}' ); {%- endif %}
|
|
29 |
{% if Type == "widget" -%} INSERT INTO WIDGET_TO_COLLECTION (ITEM_TYPE, ITEM_NAME, ICON_FILENAME, ICON_SKIN_ID, URI, COLLECTION_NAME )
|
|
30 |
VALUES ("{{Type}}", '{{Name}}', "{{IconFileName}}", "{{IconSkinId}}", "{{DestinationWidgetUri}}", '{{Collection}}' ); {%- endif %}
|
93
|
31 |
{% endfor %}
|
|
32 |
|
|
33 |
SELECT "castoragedb_variant - END" AS " ";
|
|
34 |
SELECT "------------------------------------" AS " ";
|
|
35 |
|