Sencha Mysql Queries - sql

I'm about to port an Android-Travellog App to other Plattforms using Sencha Touch.
The Problem is, that Sencha only has a Store System to store Data, but doesnt appear to have a possibilty to acctually make MySql queries.
And since most of the Mysql code in my previous app is already there, id would be quite a pain to redo everything with Senchas new System.
Is there a possibilty to use mysql (or any other sql) queries with Sencha to Store Data on the Phone?

Sencha stores and proxies abstract away the need to write raw query code. A store can use one of a number of different proxies for interfacing with different back-end data stores, one of which is the SQL proxy, which as you can see in the source code provides an API for basic data querying WebSQL databases.
If you want to gain the full benefit of the framework and do things the "Sencha way" you'll probably want to start from scratch and architect your app to use the stores API.

Related

Storing data into a DB using react native

I am new to react native, I managed to create a form to enter data and files via the form but I don't know what are my options to save it in a centralised place. I am wondering what is the best and easiest way to store data from that form to a DB, I can build the form but I don't know what are my options to store it in a DB so I have all the data in one DB on a server as we do with web applications, so I will have an app that will work on android, iOS and web version too. Thanks
You can use relation DB if you prefer, for example, https://github.com/craftzdog/react-native-sqlite-2/
However, from my point of view, it is better to use key/value storage in your case. One of the fastest implementations is https://github.com/mrousavy/react-native-mmkv

Can i connect my reactive app with Mysql database

I've searched all over the internet. I'm very new to reactnative and react. So i'm wondering how to connect my app with Mysql and perform CRUD operations.
If you're referring to an on-board database, your best options are probably Realm, which as per their gitHub page is "faster than even raw SQLite on common operations, while maintaining an extremely rich feature set," react-native-sqlite-storage, or react-native-local-mongodb.
For off-device, what has worked for me--though it was a long road to get there--is using react-native-meteor (at this repository) which does CRUD operations with MongoDB. I used MySQL when I was working exclusively in Android, but Meteor and MongoDB is a nice marriage to RN for cross-platform deployment. Otherwise you can just use Fetch in React Native, use a REST API server interaction that gives you a JSON response (which can use any server language you're comfortable with), and go from there. Good luck!

how to have database offline for iOS app

I would like to develop dictionary app for iOS application. and I am not sure which database Managment system should I use to store data. I want to my app to be offline so even user that don't have internet, they still can use my app. so my question which database should I use to store my database ? I research on google, it said sqlite. so if i store my data in sqlite so will my data in database sqllite will go with my app? thank
Yes, sqlite is your DB of choice unless you're just working with a couple of dozen records.
If you plan to use CoreData, you can also address sqlite with it.
If you don't plan to use CoreData, you can still use sqlite and work directly with the DB. There are good wrappers which help you, like FMDB: https://github.com/ccgus/fmdb

Xcode iOS phone directory app. core data, sql lite, or

as part of an application I am trying to create, I am looking to data storage solutions. However, I have found many solutions that I can not quite directly apply to the position I am in.
Basically, I want to display in my app, a directory of the staff of my organization. About 100 or so individuals. I want to have generic attributes such as name, email, office#, etc.
However, my goal is to not end up with a static representation of the staff here! (people come and go, switch offices,etc.)
I am looking for the best way (if possible) to maintain a small database that I can administer, and if perhaps, something were to change to someone here, I can make the change and the change will be reflected accordingly.
Please help! I tried submitting my first app but got rejected because I relied on a webview to accomplish this task. This is an internship opportunity and my first real chance at development. Any help will be GREATLY appreciated.
Thanks!!!!!
The iPhone directory app can be used to store data in any format you want (xml, json or a proprietary format), because all you do is save a file. But if you choose to use the iPhone app directory to store data you have to write code to read the file (very simple to do) and parse the information (not so simple because the dificulty scales based on the information complexity).
SQLite is a tool to store structured data, providing you a set of tools to access and use the information. You don't need to parse the information, because SQLite does it for you by using transact sql queries.
By now, because you have a list of individuals, and these people are relationed to offices, I think you should use SQLite.
The Code Data is a object graph management, it's a tool to give you more options over data manipulation, and can make your life very easy if you have a lot of data and very complex data models. I don't think you need that for your particular problem, but I think you should learn it at some point.
UPDATE 1
You application will have something like:
A core database (sql server, oracle, my sql, etc) will hold your individuals information (your cloud database).
A web page (php, asp.net, etc) will display the core database information in json or xml format (your api).
A iphone app will download the information from the web page and store it in the local SQLite. (you have to decide when you will update the local sql lite, like when is opened, once a week, once a moth, twice a day, etc) (your local storage method).
Display the local SQLite individuals information in the app.

Execute complex query using Session (coldfusion.air.session class)

We are working on a sync application using ColdFusion 9.0.1 ActionScript ORM Library for AIR applications. Since this is application should work smoothly offline as well, there is a list of clients that has to be loaded when a user logs in, hence we are fetching data from all the required tables when application loads (is that the right way?). Now when we get the data from the required tables then based on the user who logs in we have to filter the clients, to filter this the query required is a complex one with joins between 5-6 tables and where clause. What I found that using the Coldfusion.Air.Session class we can only load objects of tables with simple where clause. There is non ORM way to load the data but I don't think that is the right method. Is there any method using this ORM framework to load data using such complex queries.
Thanks,
Gaurav
Are you using any CF code to send data back to your application? Have you tried HQL?
In other words you can write standard cfquery and dbtype="hql"
This will let you do almost anything you can do with a standard cfquery.
I am not directly familiar with the ActionScript ORM Library for AIR.