fix swift example

main
Ziyang Hu 2 years ago
parent d22f377a8e
commit 12520b3468

@ -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 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

Loading…
Cancel
Save