Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

hello world does not wirte to disk ? #544

Open
expll opened this issue Jan 15, 2021 · 0 comments
Open

hello world does not wirte to disk ? #544

expll opened this issue Jan 15, 2021 · 0 comments

Comments

@expll
Copy link

expll commented Jan 15, 2021

"hello world" code can run, but when I terminal my app and just run the code below, str is nil

let db = YapDatabase()
db.registerCodableSerialization(String.self, forCollection: "test")

let connection = db.newConnection()

//connection.readWrite {(transaction) in
// transaction.setObject("hello", forKey: "world", inCollection: "test")
//}

connection.read {(transaction) in
let str = transaction.object(forKey: "world", inCollection: "test") as? String
}

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant