Please consider marking closures in methods such as forEachRow non escaping (@NoEscape attribute). They aren't capturing the closure anyway, but if this attribute is absent, closure requires prefixing member references with explicit 'self.'
try DB.connection.forEachRow(statement: "SELECT * FROM topics_files WHERE user_id = ?", doBindings: { statement in
try statement.bind(position: 0, self.userId!) // <---- self.
}) { statement, row in
self.topicsData = statement.columnBlob(position: 0) // <---- self.
}
public func forEachRow(statement: String, doBindings: @noescape (SQLiteStmt) throws -> (), handleRow: @noescape (SQLiteStmt, Int) -> ()) throws {}
...
func forEachRowBody(stat: SQLiteStmt, handleRow: @noescape (SQLiteStmt, Int) -> ()) throws {}
...
etc