diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2024-10-03 12:58:32 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarIT.de> | 2024-10-03 13:04:06 +0200 |
commit | e7a4d7d7c3d688b69737f2b1ecd23571f5e3a0b9 (patch) | |
tree | 6235e8cd8ea4e07df00b72067db74693ffa24953 /searx | |
parent | 2a29e16d25ae19d9216b959f177cdcd71c43511e (diff) | |
download | searxng-e7a4d7d7c3d688b69737f2b1ecd23571f5e3a0b9.tar.gz searxng-e7a4d7d7c3d688b69737f2b1ecd23571f5e3a0b9.zip |
[doc] slightly improve documentation of SQL engines
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx')
-rw-r--r-- | searx/engines/mariadb_server.py | 16 | ||||
-rw-r--r-- | searx/engines/mysql_server.py | 13 | ||||
-rw-r--r-- | searx/engines/postgresql.py | 13 | ||||
-rw-r--r-- | searx/engines/sqlite.py | 5 |
4 files changed, 47 insertions, 0 deletions
diff --git a/searx/engines/mariadb_server.py b/searx/engines/mariadb_server.py index 7cf7eec33..7343f4342 100644 --- a/searx/engines/mariadb_server.py +++ b/searx/engines/mariadb_server.py @@ -21,6 +21,9 @@ This is an example configuration for querying a MariaDB server: limit: 5 query_str: 'SELECT * from my_table WHERE my_column=%(query)s' +Implementations +=============== + """ from typing import TYPE_CHECKING @@ -39,12 +42,25 @@ if TYPE_CHECKING: engine_type = 'offline' + host = "127.0.0.1" +"""Hostname of the DB connector""" + port = 3306 +"""Port of the DB connector""" + database = "" +"""Name of the database.""" + username = "" +"""Username for the DB connection.""" + password = "" +"""Password for the DB connection.""" + query_str = "" +"""SQL query that returns the result items.""" + limit = 10 paging = True result_template = 'key-value.html' diff --git a/searx/engines/mysql_server.py b/searx/engines/mysql_server.py index 369b2b7fe..30d59332e 100644 --- a/searx/engines/mysql_server.py +++ b/searx/engines/mysql_server.py @@ -34,12 +34,25 @@ except ImportError: engine_type = 'offline' auth_plugin = 'caching_sha2_password' + host = "127.0.0.1" +"""Hostname of the DB connector""" + port = 3306 +"""Port of the DB connector""" + database = "" +"""Name of the database.""" + username = "" +"""Username for the DB connection.""" + password = "" +"""Password for the DB connection.""" + query_str = "" +"""SQL query that returns the result items.""" + limit = 10 paging = True result_template = 'key-value.html' diff --git a/searx/engines/postgresql.py b/searx/engines/postgresql.py index e7def0635..ddd0ef929 100644 --- a/searx/engines/postgresql.py +++ b/searx/engines/postgresql.py @@ -29,12 +29,25 @@ except ImportError: pass engine_type = 'offline' + host = "127.0.0.1" +"""Hostname of the DB connector""" + port = "5432" +"""Port of the DB connector""" + database = "" +"""Name of the database.""" + username = "" +"""Username for the DB connection.""" + password = "" +"""Password for the DB connection.""" + query_str = "" +"""SQL query that returns the result items.""" + limit = 10 paging = True result_template = 'key-value.html' diff --git a/searx/engines/sqlite.py b/searx/engines/sqlite.py index f5f6ac8bf..e9694cf74 100644 --- a/searx/engines/sqlite.py +++ b/searx/engines/sqlite.py @@ -41,8 +41,13 @@ import sqlite3 import contextlib engine_type = 'offline' + database = "" +"""Filename of the SQLite DB.""" + query_str = "" +"""SQL query that returns the result items.""" + limit = 10 paging = True result_template = 'key-value.html' |