1
0
Fork 0

Merging upstream version 10.6.3.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:09:58 +01:00
parent d03a55eda6
commit ece6881255
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
48 changed files with 906 additions and 266 deletions

View file

@ -14,10 +14,6 @@ from sqlglot import Dialect
from sqlglot import expressions as exp
from sqlglot.helper import ensure_collection
if t.TYPE_CHECKING:
T = t.TypeVar("T")
Edit = t.Union[Insert, Remove, Move, Update, Keep]
@dataclass(frozen=True)
class Insert:
@ -56,6 +52,11 @@ class Keep:
target: exp.Expression
if t.TYPE_CHECKING:
T = t.TypeVar("T")
Edit = t.Union[Insert, Remove, Move, Update, Keep]
def diff(source: exp.Expression, target: exp.Expression) -> t.List[Edit]:
"""
Returns the list of changes between the source and the target expressions.