我的问题是我尝试在我的查询中插入包含char的文本
我试图在char之前添加双反斜杠//但仍然无效.
ABNORMALLY.java.lang.IllegalArgumentException:
org.hibernate.QueryException: Space is not allowed after parameter prefix ':'
INSERT INTO TABLE_A (A_ID, TYPE_ID, F_ID, REFNO, RECORD) VALUES
( A_ID_SEQ.nextval, 4 , 9 , 'NY167', q'[LA2010167|SNIP' N CLIP|LMG|1.Unit no\\: 1046, 1 st Floor, Limbang Plaza, 98700 Limbang|2010-12-10||]')
Run Code Online (Sandbox Code Playgroud) 在firebase云功能API参考之后,我试图实现计数增加/减少:
Uploads/
- Posts/
- post_1
- post_2
...
- Likes/
- post_1/
- Number: 4
- post_2/
- Number: 2
...
Run Code Online (Sandbox Code Playgroud)
和,
exports.LikeCount= functions.database.ref('/Posts/{postID}').onWrite(event => {
const Ref = event.data.ref;
const postID = event.params.postID;
const likeCount= Ref.parent.parent.child('/Likes/' + postID + '/Number');
return likeCount.transaction(current => {
if (event.data.exists() && !event.data.previous.exists()) {
return (current || 0) + 1;
}else if (!event.data.exists() && event.data.previous.exists()) {
return (current || 0) - 1;
}
}).then(() => {
console.log("Done");
});
}); …Run Code Online (Sandbox Code Playgroud) javascript firebase firebase-realtime-database google-cloud-functions