jerqi commented on code in PR #5426:
URL: https://github.com/apache/gravitino/pull/5426#discussion_r1827281816
##########
core/src/main/java/org/apache/gravitino/storage/relational/mapper/provider/base/SecurableObjectBaseSQLProvider.java:
##########
@@ -84,6 +89,78 @@ public String
softDeleteRoleMetasByMetalakeId(@Param("metalakeId") Long metalake
+ " AND ro.deleted_at = 0) AND ob.deleted_at = 0";
}
+ public String softDeleteObjectRelsByMetadataObject(
+ @Param("metadataObjectId") Long metadataObjectId,
+ @Param("metadataObjectType") String metadataObjectType) {
+ return "UPDATE "
+ + SECURABLE_OBJECT_TABLE_NAME
+ + " SET deleted_at = (UNIX_TIMESTAMP() * 1000.0)"
+ + " + EXTRACT(MICROSECOND FROM CURRENT_TIMESTAMP(3)) / 1000"
+ + " WHERE metadata_object_id = #{metadataObjectId} AND deleted_at = 0"
+ + " AND type = #{metadataObjectType}";
+ }
+
+ public String softDeleteObjectRelsByCatalogId(@Param("catalogId") Long
catalogId) {
+ return "UPDATE "
+ + SECURABLE_OBJECT_TABLE_NAME
+ + " sect SET deleted_at = (UNIX_TIMESTAMP() * 1000.0)"
Review Comment:
`sec.type` are different for sub-sentences. `deleted_at`is ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]