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 ```swift
import CozoSwiftBridge import CozoSwiftBridge
... {
let path = NSHomeDirectory()
let path = NSHomeDirectory() let file = path + "/cozo-data.db"
let file = path + "/cozo-data.db" let db = CozoDB("sqlite", file)
let db = new_cozo_db("sqlite", file, ""); let res = try! db.run("?[] <- [[1,2,3]]").toString()
let result: String! = db?.run_script_str("::relations", "").toString(); }
``` ```
Above we created an SQLite-based database. For memory-based ones: Above we created an SQLite-based database. For memory-based ones:
```swift ```swift
let db = new_cozo_db("mem", "", ""); let db = CozoDB()
``` ```
### API ### API

Loading…
Cancel
Save