mirror of
https://github.com/davidhalter/django-stubs.git
synced 2025-12-10 14:01:56 +08:00
Add SQLite backend is_in_memory_db() functions (#1218)
* Add SQLite backend is_in_memory_db() functions * Update django-stubs/db/backends/sqlite3/creation.pyi Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
This commit is contained in:
@@ -26,6 +26,8 @@ class DatabaseWrapper(BaseDatabaseWrapper):
|
|||||||
introspection_class: Type[DatabaseIntrospection]
|
introspection_class: Type[DatabaseIntrospection]
|
||||||
ops_class: Type[DatabaseOperations]
|
ops_class: Type[DatabaseOperations]
|
||||||
|
|
||||||
|
def is_in_memory_db(self) -> bool: ...
|
||||||
|
|
||||||
FORMAT_QMARK_REGEX: Any
|
FORMAT_QMARK_REGEX: Any
|
||||||
|
|
||||||
class SQLiteCursorWrapper(Database.Cursor): ...
|
class SQLiteCursorWrapper(Database.Cursor): ...
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
|
from os import PathLike
|
||||||
|
from typing import Union
|
||||||
|
|
||||||
from django.db.backends.base.creation import BaseDatabaseCreation
|
from django.db.backends.base.creation import BaseDatabaseCreation
|
||||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||||
|
|
||||||
class DatabaseCreation(BaseDatabaseCreation):
|
class DatabaseCreation(BaseDatabaseCreation):
|
||||||
connection: DatabaseWrapper
|
connection: DatabaseWrapper
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def is_in_memory_db(database_name: Union[str, PathLike[str]]) -> bool: ...
|
||||||
|
|||||||
Reference in New Issue
Block a user