我刚刚购买了一台新电脑,并安装了 Ubuntu 14。PHP、Apache、MySQL。一切都运行良好,但 Xdebug 在 PhpStorm 上不起作用。请帮助我如何安装 Xdebug 并将其与 PhpStorm 集成。
我想在firestore中执行批处理事务.我将最后一个密钥存储在其他集合中.我需要获取最后一个密钥然后再增加1,然后使用此密钥创建两个文档.我怎样才能做到这一点?
let lastDealKeyRef = this.db.collection('counters').doc('dealCounter')
let dealsRef = this.db.collection('deals').doc(id)
let lastDealKey = batch.get(lastDealKeyRef) // here is the problem..
batch.set(dealsRef, dealData)
let contentRef = this.db.collection('contents').doc('deal' + id)
batch.set(contentRef, {'html': '<p>Hello World</p>' + lastDealKey })
batch.commit().then(function () {
console.log('done') })
Run Code Online (Sandbox Code Playgroud)