Passwords
Repository
The PasswordsRepository interface is
useful to manage the queries for the passwords operations
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
@Query(value = ""DELETE FROM " + PASSWORDS_KEY + _WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Query used to delete a password
Link copied to clipboard
@Modifying
@Query(value = ""UPDATE " + PASSWORDS_KEY + " SET " +
TAIL_KEY + "=:" + TAIL_KEY + "," +
SCOPES_KEY + "=:" + SCOPES_KEY +
_WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Query used to edit a GENERATED
password
Link copied to clipboard
@Modifying
@Query(value = ""UPDATE " + PASSWORDS_KEY + " SET " +
TAIL_KEY + "=:" + TAIL_KEY + "," +
SCOPES_KEY + "=:" + SCOPES_KEY + "," +
PASSWORD_KEY + "=:" + PASSWORD_KEY +
_WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Query used to edit a INSERTED
password
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@Query(value = "SELECT * FROM " + PASSWORDS_KEY +
_WHERE_ + USER_IDENTIFIER_KEY + "=:" + USER_IDENTIFIER_KEY +
" AND " + TYPE_KEY + " IN (:" + TYPE_KEY + ")" +
" ORDER BY " + CREATION_DATE_KEY + " DESC",
nativeQuery = true
)
Query used to retrieve the passwords of the
user
Link copied to clipboard
Link copied to clipboard
@Modifying
@Query(value = ""UPDATE " + PASSWORDS_KEY + " SET " +
PASSWORD_KEY + "=:" + PASSWORD_KEY +
_WHERE_ + IDENTIFIER_KEY + "=:" + IDENTIFIER_KEY",
nativeQuery = true
)
Query used to refresh a GENERATED
password
Link copied to clipboard
Link copied to clipboard