You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement a database configuration registry (#16)
Provides a database configuration manager class allowing a centralized place to configure and retrieve connections and pools from any number of databases.
"""Configuration for Aiosqlite database connections.
24
24
25
25
This class provides configuration options for Aiosqlite database connections, wrapping all parameters
@@ -28,28 +28,21 @@ class AiosqliteConfig(NoPoolConfig["Connection"], GenericDatabaseConfig):
28
28
For details see: https://github.com/omnilib/aiosqlite/blob/main/aiosqlite/__init__.pyi
29
29
"""
30
30
31
-
database: str
31
+
database: str=field(default=":memory:")
32
32
"""The path to the database file to be opened. Pass ":memory:" to open a connection to a database that resides in RAM instead of on disk."""
33
-
34
-
timeout: float|EmptyType=Empty
33
+
timeout: float|EmptyType=field(default=Empty)
35
34
"""How many seconds the connection should wait before raising an OperationalError when a table is locked. If another thread or process has acquired a shared lock, a wait for the specified timeout occurs."""
36
-
37
-
detect_types: int|EmptyType=Empty
35
+
detect_types: int|EmptyType=field(default=Empty)
38
36
"""Control whether and how data types are detected. It can be 0 (default) or a combination of PARSE_DECLTYPES and PARSE_COLNAMES."""
"""If True (default), ProgrammingError is raised if the database connection is used by a thread other than the one that created it. If False, the connection may be shared across multiple threads."""
0 commit comments