AI rule node: fix text search
This commit is contained in:
parent
5e36a4e522
commit
cdcb80ef76
@ -48,7 +48,7 @@ public class AiModelSettingsEntity extends BaseVersionedEntity<AiModelSettings>
|
|||||||
|
|
||||||
public static final Map<String, String> COLUMN_MAP = Map.of(
|
public static final Map<String, String> COLUMN_MAP = Map.of(
|
||||||
"createdTime", "created_time",
|
"createdTime", "created_time",
|
||||||
"provider", "(configuration -> 'providerConfig' ->> 'provider')",
|
"provider", "(configuration ->> 'provider')",
|
||||||
"modelId", "(configuration -> 'modelConfig' ->> 'modelId')"
|
"modelId", "(configuration -> 'modelConfig' ->> 'modelId')"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -42,7 +42,7 @@ interface AiModelSettingsRepository extends JpaRepository<AiModelSettingsEntity,
|
|||||||
WHERE ai_model.tenant_id = :tenantId
|
WHERE ai_model.tenant_id = :tenantId
|
||||||
AND (:textSearch IS NULL
|
AND (:textSearch IS NULL
|
||||||
OR ai_model.name ILIKE '%' || :textSearch || '%'
|
OR ai_model.name ILIKE '%' || :textSearch || '%'
|
||||||
OR (ai_model.configuration -> 'providerConfig' ->> 'provider') ILIKE '%' || :textSearch || '%'
|
OR (ai_model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%'
|
||||||
OR (ai_model.configuration -> 'modelConfig' ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
OR (ai_model.configuration -> 'modelConfig' ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
||||||
""",
|
""",
|
||||||
countQuery = """
|
countQuery = """
|
||||||
@ -51,7 +51,7 @@ interface AiModelSettingsRepository extends JpaRepository<AiModelSettingsEntity,
|
|||||||
WHERE ai_model.tenant_id = :tenantId
|
WHERE ai_model.tenant_id = :tenantId
|
||||||
AND (:textSearch IS NULL
|
AND (:textSearch IS NULL
|
||||||
OR ai_model.name ILIKE '%' || :textSearch || '%'
|
OR ai_model.name ILIKE '%' || :textSearch || '%'
|
||||||
OR (ai_model.configuration -> 'providerConfig' ->> 'provider') ILIKE '%' || :textSearch || '%'
|
OR (ai_model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%'
|
||||||
OR (ai_model.configuration -> 'modelConfig' ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
OR (ai_model.configuration -> 'modelConfig' ->> 'modelId') ILIKE '%' || :textSearch || '%')
|
||||||
""",
|
""",
|
||||||
nativeQuery = true
|
nativeQuery = true
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user