You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: backend/services/data-management-service/src/main/java/com/datamate/datamanagement/application/DatasetApplicationService.java
+2-11Lines changed: 2 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -194,7 +194,7 @@ public PagedResponse<DatasetResponse> getDatasets(DatasetPagingQuery query) {
Copy file name to clipboardExpand all lines: backend/services/data-management-service/src/main/java/com/datamate/datamanagement/domain/model/dataset/Dataset.java
Copy file name to clipboardExpand all lines: backend/services/data-management-service/src/main/java/com/datamate/datamanagement/infrastructure/persistence/repository/impl/DatasetRepositoryImpl.java
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -65,10 +65,12 @@ public IPage<Dataset> findByCriteria(IPage<Dataset> page, DatasetPagingQuery que
65
65
*/
66
66
for (StringtagName : query.getTags()) {
67
67
wrapper.and(w ->
68
-
w.apply("tags IS NOT NULL " +
69
-
"AND JSON_VALID(tags) = 1 " +
70
-
"AND JSON_LENGTH(tags) > 0 " +
71
-
"AND JSON_SEARCH(tags, 'one', {0}, NULL, '$[*].name') IS NOT NULL", tagName)
68
+
w.apply("EXISTS ( " +
69
+
"SELECT 1 FROM jsonb_array_elements( " +
70
+
"CASE WHEN jsonb_typeof(tags::jsonb) = 'array' THEN tags::jsonb ELSE '[]'::jsonb END " +
Copy file name to clipboardExpand all lines: backend/services/data-management-service/src/main/java/com/datamate/datamanagement/interfaces/converter/DatasetConverter.java
Copy file name to clipboardExpand all lines: backend/shared/domain-common/src/main/java/com/datamate/common/infrastructure/config/PgJsonTypeHandler.java
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
importorg.apache.ibatis.type.MappedTypes;
7
7
importorg.postgresql.util.PGobject;
8
8
9
+
importjava.lang.reflect.Field;
9
10
importjava.sql.PreparedStatement;
10
11
importjava.sql.SQLException;
11
12
@@ -18,6 +19,10 @@ public PgJsonTypeHandler(Class<?> type) {
0 commit comments