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

  }

  func insert(content: String) -> Post {
    let sql = "INSERT INTO posts(created, content) VALUES(now(), '\(content)') RETURNING id"
    let result = try! c.execute(sql)
    let id = result[0]["id"]!.string!
    let created = result[0]["created"]!.string!
    let post = Post(id: id, content: content, created: created)

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