{"id":26400563,"url":"https://github.com/silicondb/react-native-silicon-db","last_synced_at":"2025-03-17T14:26:49.482Z","repository":{"id":57340012,"uuid":"358927680","full_name":"SiliconDB/react-native-silicon-db","owner":"SiliconDB","description":"React native database on steroids","archived":false,"fork":false,"pushed_at":"2021-04-24T08:14:44.000Z","size":543,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-18T11:45:19.023Z","etag":null,"topics":["asyncstorage","database","react","reactnative"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SiliconDB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-17T16:25:33.000Z","updated_at":"2022-01-25T07:07:54.000Z","dependencies_parsed_at":"2022-08-24T14:57:03.782Z","dependency_job_id":null,"html_url":"https://github.com/SiliconDB/react-native-silicon-db","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconDB%2Freact-native-silicon-db","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconDB%2Freact-native-silicon-db/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconDB%2Freact-native-silicon-db/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiliconDB%2Freact-native-silicon-db/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SiliconDB","download_url":"https://codeload.github.com/SiliconDB/react-native-silicon-db/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244048792,"owners_count":20389404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncstorage","database","react","reactnative"],"created_at":"2025-03-17T14:26:48.747Z","updated_at":"2025-03-17T14:26:49.477Z","avatar_url":"https://github.com/SiliconDB.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![SiliconDB AsyncStorage on steroids](https://raw.githubusercontent.com/SiliconDB/react-native-silicon-db/master/silicon.jpg \"SiliconDB AsyncStorage on steroids\")](https://github.com/SiliconDB/react-native-silicon-db \"SiliconDB AsyncStorage on steroids\")\n\n\n## Install\n\n```\nnpm i react-native-silicon-db --save\n```\nor\n```\nyarn add react-native-silicon-db\n```\nInstall peer dependencies:\n```\nyarn add @react-native-async-storage/async-storage\n```\niOS\n```\ncd ios\npod install\n```\n\n## Example\n```\nimport SiliconDB from 'react-native-silicon-db';\n\nconst db = new SiliconDB({database: 'demoName'});\nconst Users = await db.collection('users');\n\n// listen Users changes\nUsers.onChange((ev) =\u003e {\n      console.log(ev); // insert/update/delete data\n});\n\n// insert object - return ID\nconst user1_id = await Users.insert({name: 'Maria', age: 20});\n\n// return user object\nlet getUser = await Users.findById(user1_id);\n\n// return all users\nlet allUsers = Users.getAll();\n\n// update user\nawait Users.update(user1_id, {age: 30});\n\n// remove user\nawait Users.remove(user1_id);\n\n// return array of users (objects) for age 30\nconst usersSearch = await Users.find({ age: 30 });\n\n// Query Selectors\nlet usersQuery = await Users.query(\n      {\n        age: {\n          $lte: 21,\n        }\n      },\n);\n/*\n\tQuery Selectors\n\t$eq\t\tMatches vals that are equal to a specified val.\n\t$gt\t\tMatches vals that are greater than a specified val.\n\t$gte\tMatches vals that are greater than or equal to a specified val.\n\t$in\t\tMatches any of the vals specified in an array.\n\t$lt\t\tMatches vals that are less than a specified val.\n\t$lte\tMatches vals that are less than or equal to a specified val.\n\t$ne\t\tMatches all vals that are not equal to a specified val.\n\t$nin\tMatches none of the vals specified in an array.\n*/\n\n// delete collection\nawait Users.drop();\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilicondb%2Freact-native-silicon-db","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsilicondb%2Freact-native-silicon-db","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsilicondb%2Freact-native-silicon-db/lists"}