Ich habe folgenden Code im sql.persist.
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
everyMinute : "0 * * * * ?"
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}
/*
* Each line in this section defines for which item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* item (excl. the group item itself).
*/
Items {
// Note: the given Alias is formatted by String.format method. Please refer
// to java.util.Formatter for detailed information. The first parameter is
// the State value, second parameter is the current Date.
Temperature* -> "insert into TEMPERATURE values('%2$tY-%2$tm-%2$td %2$tT', 999, %1$s)" : strategy = everyMinute
// Temperature* -> "insert into TEMPERATURE values(%2$ts, 999, %1$s)" : strategy = everyMinute
}
gemäss dem LOG werden anscheinend auf Einträge gemacht.
21:19:02.025 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Office' with persistence service 'sql' took 4ms
21:19:02.031 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Bed' with persistence service 'sql' took 4ms
21:19:02.037 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_GF_Toilet' with persistence service 'sql' took 4ms
21:19:02.042 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_GF_Living' with persistence service 'sql' took 4ms
21:19:02.048 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_S_Kitchen' with persistence service 'sql' took 4ms
21:19:02.054 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Child' with persistence service 'sql' took 4ms
Aber in der Datenbank finde ich nichts.
SQL ist nicht so mein Ding. Kann mir bitte Jemand helfen.
Werden die Tabellen selber erstellt oder muss ich das vorher machen?
// persistence strategies have a name and a definition and are referred to in the "Items" section
Strategies {
everyMinute : "0 * * * * ?"
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}
/*
* Each line in this section defines for which item(s) which strategy(ies) should be applied.
* You can list single items, use "*" for all items or "groupitem*" for all members of a group
* item (excl. the group item itself).
*/
Items {
// Note: the given Alias is formatted by String.format method. Please refer
// to java.util.Formatter for detailed information. The first parameter is
// the State value, second parameter is the current Date.
Temperature* -> "insert into TEMPERATURE values('%2$tY-%2$tm-%2$td %2$tT', 999, %1$s)" : strategy = everyMinute
// Temperature* -> "insert into TEMPERATURE values(%2$ts, 999, %1$s)" : strategy = everyMinute
}
gemäss dem LOG werden anscheinend auf Einträge gemacht.
21:19:02.025 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Office' with persistence service 'sql' took 4ms
21:19:02.031 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Bed' with persistence service 'sql' took 4ms
21:19:02.037 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_GF_Toilet' with persistence service 'sql' took 4ms
21:19:02.042 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_GF_Living' with persistence service 'sql' took 4ms
21:19:02.048 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_S_Kitchen' with persistence service 'sql' took 4ms
21:19:02.054 TRACE o.o.c.p.i.PersistItemsJob[:76] - Storing item 'Temperature_VB_Child' with persistence service 'sql' took 4ms
Aber in der Datenbank finde ich nichts.
SQL ist nicht so mein Ding. Kann mir bitte Jemand helfen.
Werden die Tabellen selber erstellt oder muss ich das vorher machen?
Kommentar