Skip to content
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

[dbquery] Initial contribution #8780

Merged
merged 49 commits into from
Oct 17, 2021
Merged

Conversation

lujop
Copy link
Contributor

@lujop lujop commented Oct 17, 2020

DBQuery Initial contribution

Initial contribution for a new addon that allows defining Things to execute native database queries.

This initial version provides support for InfluxDB 2.0 that is finished and usable.
In a future version in will I start to work after this, it will be submitted support for JDBC databases that currently OH support as persistence services.

A complete description of capabilities and usage of the addon is provided in it's README.

I created a new thread announcing the submission of this addon and for further discussion about it:
https://community.openhab.org/t/new-dbquery-addon-submitted/106640

The initial need for this addon was mainly discussed here:
https://community.openhab.org/t/influxdb-query-addon-proposal/95400/14

Here is another related issue that if sometime is implemented it will allow another DB implementation that uses an existing defined OH persistence service:
openhab/openhab-core#1512

@lujop lujop requested a review from a team as a code owner October 17, 2020 17:15
@TravisBuddy
Copy link

TravisBuddy commented Oct 17, 2020

Hey @lujop,
Something went wrong with the build.

TravisCI finished with status errored, which means the build failed because of something unrelated to the tests, such as a problem with a dependency or the build process itself.

View build log

TravisBuddy Request Identifier: 4c891b70-160a-11eb-94fa-edf6748ec8ed

@cpmeister cpmeister added the new binding If someone has started to work on a binding. For a new binding PR. label Oct 17, 2020
lujop added 15 commits October 17, 2020 23:32
Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@lujop lujop force-pushed the dbquery_initial_submission branch from dbd3d25 to b4ac7b5 Compare October 17, 2020 21:38
This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@lujop lujop force-pushed the dbquery_initial_submission branch from a46a257 to 06802a8 Compare October 18, 2020 07:22
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@lujop lujop closed this Oct 24, 2020
@lujop lujop deleted the dbquery_initial_submission branch October 24, 2020 13:33
@lujop lujop restored the dbquery_initial_submission branch October 24, 2020 13:33
@lujop lujop reopened this Oct 24, 2020
@Skinah Skinah added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Feb 25, 2021
@Skinah
Copy link
Contributor

Skinah commented Feb 25, 2021

Fails to build due to not being 3.1.0-SNAPSHOT

[FATAL] Non-resolvable parent POM for org.openhab.addons.bundles:org.openhab.binding.dbquery:[unknown-version]: Could not find artifact org.openhab.addons.bundles:org.openhab.addons.reactor.bundles:pom:3.0.0-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 7, column 11

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@lujop lujop requested a review from fwolter September 24, 2021 19:59
@lujop
Copy link
Contributor Author

lujop commented Sep 24, 2021

@fwolter @Skinah I've just summited another commit with your review changes, if I didn't forget something, I think that's all done.

lujop added a commit to lujop/openhab-docs that referenced this pull request Sep 24, 2021
@Skinah Skinah added rebuild Triggers Jenkins PR build and removed rebuild Triggers Jenkins PR build labels Sep 30, 2021
@Skinah
Copy link
Contributor

Skinah commented Sep 30, 2021

There are a few comments not addressed yet like putting each sentence on its own line in the readme. Take care of them and lets get this to compile with a green tick, just triggered a rebuild in case it was the build systems fault it failed.

lujop and others added 2 commits September 30, 2021 22:27
Co-authored-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@lujop
Copy link
Contributor Author

lujop commented Sep 30, 2021

There are a few comments not addressed yet like putting each sentence on its own line in the readme. Take care of them and lets get this to compile with a green tick, just triggered a rebuild in case it was the build systems fault it failed.

Done, I think that now it's all addressed.
About the addon compilation seems to build correctly in local. And in Jenkins the error I think that is prior to addon compilation, isn't it?

Signed-off-by: Joan Pujol <joanpujol@gmail.com>
@Skinah
Copy link
Contributor

Skinah commented Oct 1, 2021

Can you run a mvn clean install from the root folder NOT from inside org.openhab.binding.dbquery/ folder? the latter folder does not check how it compiles as a whole project but is quicker to compile, so do it from the root folder and let it run. Then you will see what is failing. Also check what is in the code analysis report that is found in your target folder.

@lujop
Copy link
Contributor Author

lujop commented Oct 1, 2021

Can you run a mvn clean install from the root folder NOT from inside org.openhab.binding.dbquery/ folder? the latter folder does not check how it compiles as a whole project but is quicker to compile, so do it from the root folder and let it run. Then you will see what is failing. Also check what is in the code analysis report that is found in your target folder.

@Skinah Now seems to be ok, and I already checked the code analysis report and all seems ok to me

@lujop lujop requested a review from Skinah October 2, 2021 05:00
@Skinah
Copy link
Contributor

Skinah commented Oct 2, 2021

I can't assist any further as the binding looks good to my noob eyes. Once @fwolter is happy I'm sure it will be good to merge as the build is showing as successful.

Copy link
Contributor

@Skinah Skinah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Just waiting on the open topics raised by @fwolter to be resolved.

Copy link
Member

@fwolter fwolter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any open points. LGTM

@fwolter fwolter merged commit 6cb5652 into openhab:main Oct 17, 2021
@fwolter fwolter added this to the 3.2 milestone Oct 17, 2021
@fwolter
Copy link
Member

fwolter commented Oct 17, 2021

I just noticed, that the NOTICE file is missing. Can you please file another PR adding it?

@lujop
Copy link
Contributor Author

lujop commented Oct 17, 2021

Thank you @fwolter and @Skinah for your time reviewing the addon.

About the NOTICE, I will do the PR in the next days, also I will try to submit soon the JDBC part that it's quite ready and I'm already using in my installation

frederictobiasc pushed a commit to frederictobiasc/openhab-addons that referenced this pull request Oct 26, 2021
* Initial commit

Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement reconnect attempts

If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Minor documentation changes and fix trigger channel name

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix NPE bug initializing ThingActions

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement query actions and another fixes

Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parameters and correct channel

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting and forgot part on previous commit

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Improve documentation

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add javadoc comment and license to all classes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code cleanup

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Untrack unused i18n file

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix log level for query actions trace information

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add dbquery addon to bundles pom

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Temporary remove mqtt bindings that make travis build to fail

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Revert "Temporary remove mqtt bindings that make travis build to fail"

This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code clean up from static analysis

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update code to be compatible with 3.1.0

Update dependencies version
Update Copyright
Other minor changes for new static analysis validations.
Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Requested PR changes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/JDBCBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/DatabaseBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Apply suggestions from code review

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Suggestions from code review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parent version

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/jdbc-bridge.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Changes asked in PR review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* README documentation imporovements

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix format issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

Co-authored-by: Matthew Skinner <matt@pcmus.com>
dschoepel pushed a commit to dschoepel/openhab-addons that referenced this pull request Nov 9, 2021
* Initial commit

Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement reconnect attempts

If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Minor documentation changes and fix trigger channel name

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix NPE bug initializing ThingActions

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement query actions and another fixes

Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parameters and correct channel

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting and forgot part on previous commit

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Improve documentation

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add javadoc comment and license to all classes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code cleanup

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Untrack unused i18n file

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix log level for query actions trace information

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add dbquery addon to bundles pom

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Temporary remove mqtt bindings that make travis build to fail

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Revert "Temporary remove mqtt bindings that make travis build to fail"

This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code clean up from static analysis

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update code to be compatible with 3.1.0

Update dependencies version
Update Copyright
Other minor changes for new static analysis validations.
Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Requested PR changes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/JDBCBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/DatabaseBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Apply suggestions from code review

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Suggestions from code review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parent version

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/jdbc-bridge.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Changes asked in PR review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* README documentation imporovements

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix format issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

Co-authored-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Dave J Schoepel <dave@theschoepels.com>
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
* Initial commit

Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement reconnect attempts

If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Minor documentation changes and fix trigger channel name

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix NPE bug initializing ThingActions

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement query actions and another fixes

Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parameters and correct channel

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting and forgot part on previous commit

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Improve documentation

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add javadoc comment and license to all classes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code cleanup

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Untrack unused i18n file

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix log level for query actions trace information

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add dbquery addon to bundles pom

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Temporary remove mqtt bindings that make travis build to fail

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Revert "Temporary remove mqtt bindings that make travis build to fail"

This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code clean up from static analysis

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update code to be compatible with 3.1.0

Update dependencies version
Update Copyright
Other minor changes for new static analysis validations.
Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Requested PR changes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/JDBCBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/DatabaseBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Apply suggestions from code review

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Suggestions from code review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parent version

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/jdbc-bridge.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Changes asked in PR review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* README documentation imporovements

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix format issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

Co-authored-by: Matthew Skinner <matt@pcmus.com>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
* Initial commit

Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement reconnect attempts

If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Minor documentation changes and fix trigger channel name

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix NPE bug initializing ThingActions

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement query actions and another fixes

Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parameters and correct channel

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting and forgot part on previous commit

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Improve documentation

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add javadoc comment and license to all classes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code cleanup

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Untrack unused i18n file

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix log level for query actions trace information

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add dbquery addon to bundles pom

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Temporary remove mqtt bindings that make travis build to fail

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Revert "Temporary remove mqtt bindings that make travis build to fail"

This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code clean up from static analysis

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update code to be compatible with 3.1.0

Update dependencies version
Update Copyright
Other minor changes for new static analysis validations.
Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Requested PR changes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/JDBCBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/DatabaseBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Apply suggestions from code review

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Suggestions from code review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parent version

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/jdbc-bridge.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Changes asked in PR review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* README documentation imporovements

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix format issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

Co-authored-by: Matthew Skinner <matt@pcmus.com>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
* Initial commit

Intial work history lost due to the repository shrunk done at c53e4ae (intially started from old unshrunked repo)

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement reconnect attempts

If database can be connected at bridge initialization schedule retry attempts.
Prevent  query execution scheduling if bridge isn't online

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Minor documentation changes and fix trigger channel name

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix NPE bug initializing ThingActions

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Implement query actions and another fixes

Implement actions to execute query and get last query result
Correctly serialize as JSON non scalar results to result channels

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parameters and correct channel

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting and forgot part on previous commit

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Improve documentation

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add javadoc comment and license to all classes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code cleanup

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Untrack unused i18n file

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix log level for query actions trace information

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Add dbquery addon to bundles pom

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Temporary remove mqtt bindings that make travis build to fail

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix formatting issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Revert "Temporary remove mqtt bindings that make travis build to fail"

This reverts commit 21c0995.

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Code clean up from static analysis

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update code to be compatible with 3.1.0

Update dependencies version
Update Copyright
Other minor changes for new static analysis validations.
Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Requested PR changes

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/JDBCBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/java/org/openhab/binding/dbquery/internal/DatabaseBridgeHandler.java

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Apply suggestions from code review

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Suggestions from code review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update parent version

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/jdbc-bridge.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Update bundles/org.openhab.binding.dbquery/src/main/resources/OH-INF/thing/thing-types.xml

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* Changes asked in PR review

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Update bundles/org.openhab.binding.dbquery/README.md

Co-authored-by: Matthew Skinner <matt@pcmus.com>

* README documentation imporovements

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

* Fix format issue

Signed-off-by: Joan Pujol <joanpujol@gmail.com>

Co-authored-by: Matthew Skinner <matt@pcmus.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new binding If someone has started to work on a binding. For a new binding PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants