main commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-10-16 16:30:25 +09:00
parent 91c7e04474
commit 537e7b363f
1146 changed files with 45926 additions and 77196 deletions

View File

@@ -4,14 +4,8 @@
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
from __future__ import annotations
import typing
if typing.TYPE_CHECKING:
from . import protocol
_TYPEINFO_13: typing.Final = '''\
_TYPEINFO_13 = '''\
(
SELECT
t.oid AS oid,
@@ -130,7 +124,7 @@ ORDER BY
'''.format(typeinfo=_TYPEINFO_13)
_TYPEINFO: typing.Final = '''\
_TYPEINFO = '''\
(
SELECT
t.oid AS oid,
@@ -254,7 +248,7 @@ ORDER BY
'''.format(typeinfo=_TYPEINFO)
TYPE_BY_NAME: typing.Final = '''\
TYPE_BY_NAME = '''\
SELECT
t.oid,
t.typelem AS elemtype,
@@ -283,16 +277,16 @@ WHERE
SCALAR_TYPE_KINDS = (b'b', b'd', b'e')
def is_scalar_type(typeinfo: protocol.Record) -> bool:
def is_scalar_type(typeinfo) -> bool:
return (
typeinfo['kind'] in SCALAR_TYPE_KINDS and
not typeinfo['elemtype']
)
def is_domain_type(typeinfo: protocol.Record) -> bool:
return typeinfo['kind'] == b'd' # type: ignore[no-any-return]
def is_domain_type(typeinfo) -> bool:
return typeinfo['kind'] == b'd'
def is_composite_type(typeinfo: protocol.Record) -> bool:
return typeinfo['kind'] == b'c' # type: ignore[no-any-return]
def is_composite_type(typeinfo) -> bool:
return typeinfo['kind'] == b'c'