diff --git a/cozo-lib-swift/README.md b/cozo-lib-swift/README.md index 13dc13b4..c4c88849 100644 --- a/cozo-lib-swift/README.md +++ b/cozo-lib-swift/README.md @@ -54,16 +54,16 @@ this around with Git LFS, but no luck). ```swift import CozoSwiftBridge -... - -let path = NSHomeDirectory() -let file = path + "/cozo-data.db" -let db = new_cozo_db("sqlite", file, ""); -let result: String! = db?.run_script_str("::relations", "").toString(); +{ + let path = NSHomeDirectory() + let file = path + "/cozo-data.db" + let db = CozoDB("sqlite", file) + let res = try! db.run("?[] <- [[1,2,3]]").toString() +} ``` Above we created an SQLite-based database. For memory-based ones: ```swift -let db = new_cozo_db("mem", "", ""); +let db = CozoDB() ``` ### API