You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When. I do a query and get ZERO ROWS I get this error: MySQLError.lengthEncodedData: Could not parse length encoded data
`
router.post("test") { req -> HTTPResponse in
let _ = req.requestPooledConnection(to: .mysql).flatMap { conn -> EventLoopFuture in
return conn.simpleQuery ("SELECT * FROM control WHERE type = 'custAppLogIn' AND id = '1234' AND user = 'fakeUser'").flatMap({ (conn) -> EventLoopFuture<String> in
let resp = " I have \(String(conn.count))rows"
return req.eventLoop.newSucceededFuture(result: resp)
})
}
let f = "/Users/myuser/Desktop/sample.txt"
let data = try req.fileio().chunkedStream(file:f)
var res = HTTPResponse(status: .ok, body: data)
res.contentType = .plainText
return res
}
`
The text was updated successfully, but these errors were encountered:
im using
mysql Ver 14.14 Distrib 5.7.22, for Linux (x86_64) using EditLine wrapper CENTOS
.package(url: "https://github.com/vapor/fluent-mysql.git", from: "3.0.0-rc"),
Vapor Toolbox: 3.1.6
When. I do a query and get ZERO ROWS I get this error:
MySQLError.lengthEncodedData: Could not parse length encoded data
`
router.post("test") { req -> HTTPResponse in
let _ = req.requestPooledConnection(to: .mysql).flatMap { conn -> EventLoopFuture in
}
`
The text was updated successfully, but these errors were encountered: