Closed GoogleCodeExporter closed 9 years ago
I forgot the Patch...
Original comment by Helmut.L...@gmail.com
on 14 Sep 2013 at 3:29
Attachments:
I assume that in addition to this patch, you have also changed the row type to
some sort of CHAR (or VARCHAR)? I was worried that this may have caused a speed
issue, but at least with a small table (9000 entries) that I have on my test
setup, it doesn't seem to be a major problem.
Original comment by ch...@cd-jackson.com
on 14 Sep 2013 at 6:50
No, keep it simple! Boolean values stored as double ( 0 or 1 ), that's it. ;-)
//ORIGINAL Line: itemValue = Double.parseDouble(item.getState().toString());
itemValue = getStateAsDouble(item);
/**
* Converts ItemState to Double
* @param item
* @return Double
*/
private Double getStateAsDouble(Item item){
if( item instanceof SwitchItem ||
item instanceof RollershutterItem ||
item instanceof ContactItem ) {
return Double.parseDouble(item.getStateAs(DecimalType.class).toString());
}
return Double.parseDouble(item.getState().toString());
}
Original comment by Helmut.L...@gmail.com
on 15 Sep 2013 at 4:47
Ok - so this is just to persist other numeric data (which I completely agree
with as your use case is also the same as mine). To avoid too many changes to
the table structure, I think we should try and get a consensus on the format so
that it covers as much as possible.
This patch should cover most items that are "numeric" - I guess we need to work
out what to do with strings...
Original comment by ch...@cd-jackson.com
on 15 Sep 2013 at 9:45
Original comment by teichsta
on 5 Nov 2013 at 10:53
This issue has been migrated to Github. If this issue id is greater than103 its
id has been preserved on Github. You can open your issue by calling the URL
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or
equal 103 new ids were created.
Original comment by teichsta
on 17 Nov 2013 at 8:08
see above!
Issue has been migrated to Github and should be discussed there.
Original comment by teichsta
on 21 Nov 2013 at 1:51
Original issue reported on code.google.com by
Helmut.L...@gmail.com
on 14 Sep 2013 at 3:26