-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
322 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
# pyright: reportPrivateUsage=false | ||
__all__ = ["Vectorize"] | ||
|
||
import re | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
from typing import Any, Protocol, TypeVar, Sequence | ||
from . import pool, connection | ||
|
||
# Core types | ||
T = TypeVar('T') | ||
|
||
class Record(Protocol): | ||
def __getitem__(self, key: int | str) -> Any: ... | ||
def __iter__(self) -> Any: ... | ||
def __len__(self) -> int: ... | ||
def get(self, key: str, default: T = None) -> T | None: ... | ||
def keys(self) -> Sequence[str]: ... | ||
def values(self) -> Sequence[Any]: ... | ||
def items(self) -> Sequence[tuple[str, Any]]: ... | ||
|
||
# Allow dictionary-style access to fields | ||
def __getattr__(self, name: str) -> Any: ... | ||
|
||
# Re-exports | ||
Connection = connection.Connection | ||
Pool = pool.Pool | ||
Record = Record | ||
|
||
# Functions | ||
async def connect( | ||
dsn: str | None = None, | ||
*, | ||
host: str | None = None, | ||
port: int | None = None, | ||
user: str | None = None, | ||
password: str | None = None, | ||
database: str | None = None, | ||
timeout: int = 60 | ||
) -> Connection: ... | ||
|
||
async def create_pool( | ||
dsn: str | None = None, | ||
*, | ||
min_size: int = 10, | ||
max_size: int = 10, | ||
max_queries: int = 50000, | ||
max_inactive_connection_lifetime: float = 300.0, | ||
setup: Any | None = None, | ||
init: Any | None = None, | ||
**connect_kwargs: Any | ||
) -> Pool: ... |
Oops, something went wrong.