Created
February 13, 2023 06:38
-
-
Save RomikMakavana/98ec22c49f4585dfa66bfdabba2598be to your computer and use it in GitHub Desktop.
Prevent Sql Injection in Realm Database - React Native
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Realm from 'realm'; | |
const PersonSchema = { | |
name: 'Person', | |
properties: { | |
name: 'string', | |
age: 'int', | |
}, | |
}; | |
const realm = await Realm.open({ | |
schema: [PersonSchema], | |
}); | |
const filterValue = 'John'; | |
const filteredPersons = realm.objects('Person').filtered(`name == $0`, filterValue); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment