简体   繁体   English

反应本机连接到 sql 数据库

[英]React native connecting to a sql database

I need someone to point me to the right direction, i am playing around with SQL databases and wish to connect the dots with react native.我需要有人指出我正确的方向,我正在玩 SQL 数据库,并希望将这些点与本机反应联系起来。 how do i get react native user input to update a database value for example.例如,我如何获取本地用户输入以更新数据库值。

if anyone can point me in the right direction please如果有人能指出我正确的方向,请

So typically react native doesnt directly communicate with an sql database, the backend does, this is for many reasons, mainly security.所以通常反应原生不直接与 sql 数据库通信,后端会这样做,这有很多原因,主要是安全性。 If you want to avoid building a backend, you should look into Firebase.如果您想避免构建后端,您应该查看 Firebase。 Other than that, you can use SQLLite on react native, but you'll only be able to store locally除此之外,您可以在 react native 上使用 SQLLite,但您只能在本地存储

To answer your question, you'll probably want to create a simple REST Api backend to communicate with your app.要回答您的问题,您可能需要创建一个简单的 REST Api 后端来与您的应用程序通信。 The backend will update the database, not the app.后端将更新数据库,而不是应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM