Skip to content

Commit 2224595

Browse files
JaeHyuckSasobolevn
andauthored
5.0: Update django.db.models.sql.compiler (#2166)
* 5.0: Update django.db.models.sql.compiler * Update django-stubs/db/models/sql/compiler.pyi --------- Co-authored-by: Nikita Sobolev <[email protected]>
1 parent de6d1fa commit 2224595

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

django-stubs/db/models/sql/compiler.pyi

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ from uuid import UUID
77
from django.db.backends.base.base import BaseDatabaseWrapper
88
from django.db.backends.utils import CursorWrapper
99
from django.db.models.base import Model
10-
from django.db.models.expressions import BaseExpression, Expression
10+
from django.db.models.expressions import BaseExpression, Expression, Ref
1111
from django.db.models.sql.query import Query
1212
from django.db.models.sql.subqueries import AggregateQuery, DeleteQuery, InsertQuery, UpdateQuery
1313
from django.utils.functional import cached_property
@@ -18,6 +18,9 @@ _ParamT: TypeAlias = str | int
1818
_ParamsT: TypeAlias = list[_ParamT]
1919
_AsSqlType: TypeAlias = tuple[str, _ParamsT]
2020

21+
class PositionRef(Ref):
22+
def __init__(self, ordinal: str, refs: str, source: Expression) -> None: ...
23+
2124
class SQLCompiler:
2225
query: Query
2326
connection: BaseDatabaseWrapper

scripts/stubtest/allowlist_todo.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1222,7 +1222,6 @@ django.db.models.sql.Query.names_to_path
12221222
django.db.models.sql.Query.solve_lookup_type
12231223
django.db.models.sql.Query.table_alias
12241224
django.db.models.sql.XOR
1225-
django.db.models.sql.compiler.PositionRef
12261225
django.db.models.sql.compiler.SQLCompiler.__init__
12271226
django.db.models.sql.compiler.SQLCompiler.deferred_to_columns
12281227
django.db.models.sql.compiler.SQLCompiler.get_default_columns

0 commit comments

Comments
 (0)