JPQL中是否有任何运算符等同于SQL BINARY
?
我GOOGLE了很多,发现没有人提到它。什么是JPQL中的BINARY运算符?
在此先感谢!
对于二元运算符,这里是在MySQL site描述。
The BINARY operator casts the string following it to a binary string.
This is an easy way to force a column comparison to be done byte by byte
rather than character by character. This causes the comparison to be case
sensitive even if the column is not defined as BINARY or BLOB. BINARY also
causes trailing spaces to be significant.
mysql> SELECT 'a' = 'A';
-> 1
mysql> SELECT BINARY 'a' = 'A';
-> 0
mysql> SELECT 'a' = 'a ';
-> 1
mysql> SELECT BINARY 'a' = 'a ';
-> 0
BTY,我使用MySQL 5.6。(虽然我不认为这个问题与MySQL有关的做...)
这看起来像一个很大的SQL注入目标! –