flagsmith-sql-flag-engine 0.1.1__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/PKG-INFO +1 -1
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/pyproject.toml +1 -1
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/translator.py +3 -9
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/README.md +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/__init__.py +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/dialect.py +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/dialects/__init__.py +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/dialects/clickhouse.py +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/py.typed +0 -0
- {flagsmith_sql_flag_engine-0.1.1 → flagsmith_sql_flag_engine-0.1.2}/src/flagsmith_sql_flag_engine/utils.py +0 -0
|
@@ -435,19 +435,13 @@ def translate_condition(cond: SegmentCondition, ctx: TranslateContext) -> str |
|
|
|
435
435
|
identity: dict[str, object] = ctx.evaluation_context.get("identity") or {} # type: ignore[assignment]
|
|
436
436
|
kind = classification.kind
|
|
437
437
|
if not prop:
|
|
438
|
-
#
|
|
439
|
-
# identity,
|
|
440
|
-
#
|
|
441
|
-
if not identity.get("key"):
|
|
442
|
-
return "FALSE"
|
|
438
|
+
# In traditional engine implementations, this branch implies
|
|
439
|
+
# an identity-less context, which makes no sense for the SQL engine.
|
|
440
|
+
# Assume identity key.
|
|
443
441
|
value_expr = ctx.dialect.cast_string(ctx.identity_key_expr)
|
|
444
442
|
elif kind == "key":
|
|
445
|
-
if not identity.get("key"):
|
|
446
|
-
return "FALSE"
|
|
447
443
|
value_expr = ctx.dialect.cast_string(ctx.jsonpath_expr("$.identity.key"))
|
|
448
444
|
elif kind == "identifier":
|
|
449
|
-
if not identity.get("identifier"):
|
|
450
|
-
return "FALSE"
|
|
451
445
|
value_expr = ctx.dialect.cast_string(ctx.jsonpath_expr("$.identity.identifier"))
|
|
452
446
|
elif kind == "identity_object":
|
|
453
447
|
# PERCENTAGE_SPLIT on `$.identity` — the whole dict. Engine
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|