Skip to content

Commit

Permalink
add more find examples
Browse files Browse the repository at this point in the history
  • Loading branch information
donsez committed Dec 4, 2024
1 parent 9073f60 commit fdb483c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions meteor.js/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,26 @@ db.tasks.insertOne(
}
)
// SELECT * FROM tasks
db.tasks.find()
db.tasks.find( { "text": "Tenth" } )
db.tasks.find( { "text": "Tenth task" } )
// SELECT * FROM tasks WHERE text = 'Tenth Task'
db.tasks.find( { "text": "Tenth Task" } )
// SELECT * FROM tasks WHERE text LIKE '%ask%'
db.tasks.find( { "text": /.*ask.*/ } )
db.tasks.find( { "text": /ask/ } )
// Case insensitive and case insensitive
db.tasks.find({'text': {'$regex': '.*task.*'}})
db.tasks.find({'text': {'$regex': '.*task.*', '$options' : 'i'}})
// SELECT * FROM users WHERE username LIKE '%mete%'
db.users.find({username: /mete/})
```

What's happen into the browsers ?
Expand Down

0 comments on commit fdb483c

Please sign in to comment.