mirror of
https://github.com/elisspace/core.git
synced 2026-10-04 16:26:19 +00:00
Raise an issue for legacy SQL queries that will cause full table scans (#90971)
* Raise an issue for SQL queries that will cause full table scans * Raise an issue for SQL queries that will cause full table scans * Raise an issue for SQL queries that will cause full table scans * Raise an issue for SQL queries that will cause full table scans * Update homeassistant/components/sql/sensor.py Co-authored-by: Paulus Schoutsen <balloob@gmail.com> * coverage --------- Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
committed by
Paulus Schoutsen
co-authored by
Paulus Schoutsen
parent
6522a3ad1b
commit
dc2f2e8d3f
@@ -63,6 +63,24 @@ YAML_CONFIG = {
|
||||
}
|
||||
}
|
||||
|
||||
YAML_CONFIG_FULL_TABLE_SCAN = {
|
||||
"sql": {
|
||||
CONF_NAME: "Get entity_id",
|
||||
CONF_QUERY: "SELECT entity_id from states",
|
||||
CONF_COLUMN_NAME: "entity_id",
|
||||
CONF_UNIQUE_ID: "entity_id_12345",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
YAML_CONFIG_FULL_TABLE_SCAN_NO_UNIQUE_ID = {
|
||||
"sql": {
|
||||
CONF_NAME: "Get entity_id",
|
||||
CONF_QUERY: "SELECT entity_id from states",
|
||||
CONF_COLUMN_NAME: "entity_id",
|
||||
}
|
||||
}
|
||||
|
||||
YAML_CONFIG_BINARY = {
|
||||
"sql": {
|
||||
CONF_DB_URL: "sqlite://",
|
||||
|
||||
Reference in New Issue
Block a user