|
|
@ -42,8 +42,8 @@ interface AiModelRepository extends JpaRepository<AiModelEntity, UUID>, Exportab |
|
|
WHERE model.tenant_id = :tenantId |
|
|
WHERE model.tenant_id = :tenantId |
|
|
AND (:textSearch IS NULL |
|
|
AND (:textSearch IS NULL |
|
|
OR model.name ILIKE '%' || :textSearch || '%' |
|
|
OR model.name ILIKE '%' || :textSearch || '%' |
|
|
OR (model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%' |
|
|
OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%' |
|
|
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%') |
|
|
OR model.configuration ->> 'modelId' ILIKE '%' || :textSearch || '%') |
|
|
""", |
|
|
""", |
|
|
countQuery = """ |
|
|
countQuery = """ |
|
|
SELECT COUNT(*) |
|
|
SELECT COUNT(*) |
|
|
@ -51,7 +51,7 @@ interface AiModelRepository extends JpaRepository<AiModelEntity, UUID>, Exportab |
|
|
WHERE model.tenant_id = :tenantId |
|
|
WHERE model.tenant_id = :tenantId |
|
|
AND (:textSearch IS NULL |
|
|
AND (:textSearch IS NULL |
|
|
OR model.name ILIKE '%' || :textSearch || '%' |
|
|
OR model.name ILIKE '%' || :textSearch || '%' |
|
|
OR (model.configuration ->> 'provider') ILIKE '%' || :textSearch || '%' |
|
|
OR REPLACE(model.configuration ->> 'provider', '_', ' ') ILIKE '%' || :textSearch || '%' |
|
|
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%') |
|
|
OR (model.configuration ->> 'modelId') ILIKE '%' || :textSearch || '%') |
|
|
""", |
|
|
""", |
|
|
nativeQuery = true |
|
|
nativeQuery = true |
|
|
|