Commit Graph

5 Commits (f0ec1235b1f65e985393ddeaea1df439849e3612)

Author SHA1 Message Date
dougiteixeira 65c21438a6
Add query type validation independent of declaration position for SQL (#105921)
* Add query type validation independent of declaration position

* Restore close sess

* Separates invalid query and non-read-only query tests

* Add more tests

* Use the SQLParseError exception for queries that are not read-only

* Add handling for multiple SQL queries.

* Fix test

* Clean ';' at the beginning of the SQL query

* Clean ';' at the beginning of the SQL query - init

* Query cleaning before storing

* Query cleaning before setup sesensor plataform - YAML

* Exception when the SQL query type is not detected

* Cleaning

* Cleaning

* Fix typing in tests

* Fix typing in tests

* Add test for query = ';;'

* Update homeassistant/components/sql/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update homeassistant/components/sql/__init__.py

Co-authored-by: G Johansson <goran.johansson@shiftit.se>

* Update __init__.py

* Update config_flow.py

* Clean query before storing

---------

Co-authored-by: G Johansson <goran.johansson@shiftit.se>
2023-12-27 17:58:35 +01:00
G Johansson afa58b80bd
Default to recorder db for SQL integration (#85436)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-03-13 17:41:32 -10:00
epenet dab8557951
Add type hints to integration tests (part 21) (#88233) 2023-02-16 11:15:26 +01:00
G Johansson 2a965a6e44
SQL reintroduce yaml support (#75205)
Co-authored-by: J. Nick Koston <nick@koston.org>
2023-01-07 18:14:36 -10:00
G Johansson 472ffd3bc6
Implement config flow for SQL integration (#68700) 2022-04-24 08:50:32 -10:00