         } else {
             // error in statement
             if !silenceErrors {
-                print("SQL Error in : \(sql) \n Message: \(String(cString: sqlite3_errmsg(db)))\n")
+                result.error = "\(String(cString: sqlite3_errmsg(db)))"
             }
         }
         
         sqlite3_finalize(stmt)
         
-    }
-    
-    public func execute(compiledAction: SWSQLAction) {
-        execute(sql: compiledAction.statement, params: compiledAction.parameters)
-    }
-    
-    public func execute(sql: String, params:[Any]) {
-        
-        execute(sql: sql, params: params, silenceErrors: false)
-        
-    }
-    
-    public func execute(actions: [Action]) {
+        return result
+        
+    }
+    
+    public func execute(compiledAction: SWSQLAction) -> Result {
+        return execute(sql: compiledAction.statement, params: compiledAction.parameters)
+    }
+    
+    public func execute(sql: String, params:[Any]) -> Result {
+        
+        return execute(sql: sql, params: params, silenceErrors: false)
+        
+    }
+    
+    public func execute(actions: [Action]) -> Result {
+        
+        var result = Result()
         
         for action in actions {
-            execute(sql: action.builtStatement, params: [], silenceErrors: true)
-        }
-        
-    }
-    
-    public func query(sql: String, params:[Any]) -> [Record] {
-        
+            result = execute(sql: action.builtStatement, params: [], silenceErrors: true)
+        }
+        
+        return result
+        
+    }
+    
+    public func query(sql: String, params:[Any]) -> Result {
+        
+        let result = Result()
         var results: [[String:Value]] = []
         
         var values: [Value] = []

    
}

public class SWSQLite {
    
    var db: OpaquePointer?

        db = nil;
    }
    
    public func execute(sql: String, params:[Any], silenceErrors: Bool) -> Result {
        
        let result = Result()
        
        var values: [Value] = []
        for o in params {
