Skip to content

Instantly share code, notes, and snippets.

@RomikMakavana
Created February 13, 2023 06:38
Show Gist options
  • Save RomikMakavana/98ec22c49f4585dfa66bfdabba2598be to your computer and use it in GitHub Desktop.
Save RomikMakavana/98ec22c49f4585dfa66bfdabba2598be to your computer and use it in GitHub Desktop.
Prevent Sql Injection in Realm Database - React Native
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