我不小心在系列中插入了带有单引号的标签:
> show series
key
---
sensor,boardid=b'5ddd2d00'
sensor,boardid=living_room
,我无法摆脱它们。我尝试过
drop series from sensor where boardid="b\'5ddd2d00\'"
drop series from sensor where boardid="b'5ddd2d00'"
drop series from sensor where boardid='5ddd2d00'
但该系列仍然存在。
如何删除它 ??
答案 0 :(得分:0)
我通过正则表达式找到了一个解决方案,但不喜欢它
func theMethod() {
let data = UnsafeMutablePointer<UInt8>.allocate(capacity: 16)
let outputStream = OutputStream(toBuffer: data, capacity: 16)
payload = Data(count: 8)
if let payload = payload {
payload.withUnsafeBytes { (bytes: UnsafePointer<UInt8>) -> Void in //<-- alert here
_ = bytes.withMemoryRebound(to: UInt8.self, capacity: 1) { ptr in
outputStream.write(ptr, maxLength: 1)
}
}
}
}