PHP 8.2.30
Preview: operators.py Size: 2.74 KB
//opt/hc_python/lib64/python3.12/site-packages/sqlalchemy/dialects/postgresql/operators.py

# dialects/postgresql/operators.py
# Copyright (C) 2005-2025 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
# mypy: ignore-errors
from ...sql import operators


_getitem_precedence = operators._PRECEDENCE[operators.json_getitem_op]
_eq_precedence = operators._PRECEDENCE[operators.eq]

# JSON + JSONB
ASTEXT = operators.custom_op(
    "->>",
    precedence=_getitem_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
)

JSONPATH_ASTEXT = operators.custom_op(
    "#>>",
    precedence=_getitem_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
)

# JSONB + HSTORE
HAS_KEY = operators.custom_op(
    "?",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

HAS_ALL = operators.custom_op(
    "?&",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

HAS_ANY = operators.custom_op(
    "?|",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

# JSONB
DELETE_PATH = operators.custom_op(
    "#-",
    precedence=_getitem_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
)

PATH_EXISTS = operators.custom_op(
    "@?",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

PATH_MATCH = operators.custom_op(
    "@@",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

# JSONB + ARRAY + HSTORE + RANGE
CONTAINS = operators.custom_op(
    "@>",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

CONTAINED_BY = operators.custom_op(
    "<@",
    precedence=_eq_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
    is_comparison=True,
)

# ARRAY + RANGE
OVERLAP = operators.custom_op(
    "&&",
    precedence=_eq_precedence,
    is_comparison=True,
)

# RANGE
STRICTLY_LEFT_OF = operators.custom_op(
    "<<", precedence=_eq_precedence, is_comparison=True
)

STRICTLY_RIGHT_OF = operators.custom_op(
    ">>", precedence=_eq_precedence, is_comparison=True
)

NOT_EXTEND_RIGHT_OF = operators.custom_op(
    "&<", precedence=_eq_precedence, is_comparison=True
)

NOT_EXTEND_LEFT_OF = operators.custom_op(
    "&>", precedence=_eq_precedence, is_comparison=True
)

ADJACENT_TO = operators.custom_op(
    "-|-", precedence=_eq_precedence, is_comparison=True
)

# HSTORE
GETITEM = operators.custom_op(
    "->",
    precedence=_getitem_precedence,
    natural_self_precedent=True,
    eager_grouping=True,
)

Directory Contents

Dirs: 1 × Files: 19

Name Size Perms Modified Actions
- drwxr-xr-x 2025-04-04 08:02:01
Edit Download
13.53 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
40.32 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
175.46 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
11.84 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
15.94 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
11.65 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
12.57 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
17.16 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
2.74 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
18.20 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
9.04 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
5.63 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
22.78 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
31.28 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
1.71 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
32.21 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
7.45 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
5.56 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download
3.80 KB lrw-r--r-- 2025-04-04 08:02:01
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).