mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-12 20:53:48 +00:00
docs: Config documents & i18n supports (#2365)
This commit is contained in:
@@ -26,7 +26,7 @@ class DuckDbConnectorParameters(BaseDatasourceParameters):
|
||||
"""DuckDB connection parameters."""
|
||||
|
||||
__type__ = "duckdb"
|
||||
path: str = field(metadata={"description": _("Path to the DuckDB file.")})
|
||||
path: str = field(metadata={"help": _("Path to the DuckDB file.")})
|
||||
driver: str = field(
|
||||
default="duckdb",
|
||||
metadata={
|
||||
|
@@ -41,15 +41,19 @@ class SQLiteConnectorParameters(BaseDatasourceParameters):
|
||||
|
||||
path: str = dataclasses.field(
|
||||
metadata={
|
||||
"help": "SQLite database file path. Use ':memory:' for in-memory database",
|
||||
"help": _(
|
||||
"SQLite database file path. Use ':memory:' for in-memory database"
|
||||
),
|
||||
"required": True,
|
||||
}
|
||||
)
|
||||
check_same_thread: bool = dataclasses.field(
|
||||
default=False,
|
||||
metadata={
|
||||
"help": "Check same thread or not, default is False. Set False to allow "
|
||||
"sharing connection across threads"
|
||||
"help": _(
|
||||
"Check same thread or not, default is False. Set False to allow "
|
||||
"sharing connection across threads"
|
||||
)
|
||||
},
|
||||
)
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
import logging
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Dict, Iterable, List, Optional, Tuple, cast
|
||||
from typing import Any, Dict, Iterable, List, Optional, Tuple, Type, cast
|
||||
from urllib.parse import quote
|
||||
from urllib.parse import quote_plus as urlquote
|
||||
|
||||
@@ -58,6 +58,11 @@ class VerticaConnector(RDBMSConnector):
|
||||
db_type = "vertica"
|
||||
db_dialect = "vertica"
|
||||
|
||||
@classmethod
|
||||
def param_class(cls) -> Type[VerticaParameters]:
|
||||
"""Return the parameter class."""
|
||||
return VerticaParameters
|
||||
|
||||
@classmethod
|
||||
def from_uri_db(
|
||||
cls,
|
||||
|
Reference in New Issue
Block a user