       if dataCache.count != 0 {
         return dataCache.filter({ $0.id == id }).first
       }
-      let result = try! c.execute("SELECT * FROM posts WHERE id = '\(id)'")
+      let result = try! c.execute("SELECT * FROM posts WHERE id = '$1'", parameters: [id])
       if result.count > 0 {
         let row = result[0]
         return Post(

      return nil
    }
    set {
      if let post = newValue {
        try! c.execute("UPDATE posts SET content = '\(post.content)' WHERE id = '\(id)'")
      } else {
        try! c.execute("DELETE from posts WHERE id = '\(id)'")
      }
      dataCache.removeAll()
      if all.count > 0 {

  }

  var all: [Post] {
    // TODO: pagenation
    if dataCache.count != 0 {
      return dataCache
    }
    let result = try! c.execute("SELECT * FROM posts ORDER BY id DESC")
    let posts = result.map { row in
      return Post(
        id: row["id"]!.string!,
