mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-26 04:07:50 +00:00
README.md
This commit is contained in:
1 parent
cb096d8710
commit
d41c6dccc5
1 file changed
+4
-4
@@ -484,10 +484,10 @@ For example:
|
||||
|
||||
```swift
|
||||
dbQueue.inDatabase { db in
|
||||
// All emails ending in @domain.com:
|
||||
let emails = String.fetch(db,
|
||||
"SELECT emails FROM persons WHERE email LIKE ?",
|
||||
arguments: ["%@domain.com"])
|
||||
// The number of persons with an email ending in @domain.com:
|
||||
let count = Int.fetchOne(db,
|
||||
"SELECT COUNT(*) FROM persons WHERE email LIKE ?",
|
||||
arguments: ["%@domain.com"])!
|
||||
|
||||
// The emails of people who own at least two pets:
|
||||
let emails = String.fetch(db,
|
||||
|
||||
Reference in new issue
Block a user