-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 165: Misc database issue #63
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the "start" parameter needs to be set to the "end" to return only following # values in the next update query
LIMIT & ORDER-BY to use MAX() # the latter seems to be faster and more compatible with other RDBMS
. add current value of items to internal buffer to log them into database use NULL as duration (indicating no duration available, last value) . change update_item() to update the NULL-duration value or add a new one as done before . change update_item() to add a new NULL-duration item for the current value . in _dump() reuse create timestamp for "end" value . change fetch_log() to query data for three different types of item logs: * items intersecting the query-range at the beginning * items intersecting the query-range at the ending (NULL-duration) * items completely within query-range
…series() to make it possible to pass int values
…rse_item() # fixes concurrent database access problems
… and _execute() methods which will create a lock if no cursor is given already
- change cursor handling in parse_item() to always free them after processing - fix last_change timestamp appinding to buffer in parse_item()
. add current value of items to internal buffer to log them into database use NULL as duration (indicating no duration available, last value) . change update_item() to update the NULL-duration value or add a new one as done before . change update_item() to add a new NULL-duration item for the current value . in _dump() reuse create timestamp for "end" value . change fetch_log() to query data for three different types of item logs: * items intersecting the query-range at the beginning * items intersecting the query-range at the ending (NULL-duration) * items completely within query-range
…series() to make it possible to pass int values
…rse_item() # fixes concurrent database access problems
… and _execute() methods which will create a lock if no cursor is given already
- change cursor handling in parse_item() to always free them after processing - fix last_change timestamp appinding to buffer in parse_item()
14 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes for the issue smarthomeNG/smarthome#165. The left-overs will be handled in separate issues.