Updates
Repository
The UpdatesRepository interface is
useful to manage the queries for the updates of a project
Author
N7ghtm4r3 - Tecknobit
See also
JpaRepository
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Modifying(clearAutomatically = true
)
@Query(value = ""DELETE FROM " + UPDATES_KEY + " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Method to execute the query to delete an
existing Update
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Query(value = ""SELECT * FROM " + UPDATES_KEY + " WHERE " + PROJECT_KEY + "=:" + PROJECT_KEY
+ " AND " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Method to execute the query to select a Update
by its id
Link copied to clipboard
@Query(value = ""SELECT * FROM " + UPDATES_KEY + " WHERE " + PROJECT_KEY + "=:" + PROJECT_KEY
+ " AND " + UPDATE_TARGET_VERSION_KEY + "=:" + UPDATE_TARGET_VERSION_KEY",
nativeQuery = true
)
Method to execute the query to select a Update
by its target project_version
Link copied to clipboard
@Modifying(clearAutomatically = true
)
@Query(value = ""UPDATE " + UPDATES_KEY + " SET "
+ UPDATE_PUBLISH_DATE_KEY + "=:" + UPDATE_PUBLISH_DATE_KEY + ","
+ UPDATE_PUBLISHED_BY_KEY + "=:" + UPDATE_PUBLISHED_BY_KEY + ","
+ UPDATE_STATUS_KEY + "= 'PUBLISHED'"
+ " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Method to execute the query to publish an
existing Update
Link copied to clipboard
@Modifying(clearAutomatically = true
)
@Query(value = ""UPDATE " + UPDATES_KEY + " SET "
+ AUTHOR_KEY + "=NULL,"
+ UPDATE_STARTED_BY_KEY + "=NULL,"
+ UPDATE_PUBLISHED_BY_KEY + "=NULL"
+ " WHERE " + AUTHOR_KEY + "=:" + IDENTIFIER_KEY
+ " OR " + UPDATE_STARTED_BY_KEY + "=:" + IDENTIFIER_KEY
+ " OR " + UPDATE_PUBLISHED_BY_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Method to execute the query to remove the
constraints between PandoroUser
deleted and Update
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Modifying(clearAutomatically = true
)
@Query(value = ""UPDATE " + UPDATES_KEY + " SET "
+ UPDATE_START_DATE_KEY + "=:" + UPDATE_START_DATE_KEY + ","
+ UPDATE_STARTED_BY_KEY + "=:" + UPDATE_STARTED_BY_KEY + ","
+ UPDATE_STATUS_KEY + "= 'IN_DEVELOPMENT'"
+ " WHERE " + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Method to execute the query to start an
existing Update