0

I have integrated my project with Jaydata using sqlite provider. I have searched and tried but did not find any alternative to write sql queries in the function of Jaydata. I want to group my data upto multiple levels which is same as 'groupby' in sql/sqlite. Can someone please tell me that is it possible to write sql / sqlite queries using Jaydata because when I have done my R&D I have found that only JavaScript Query Language can be used which is comprising of some functions like .filter(),.toArray(),.map(),.take(),.orderBy,etc.

What is the best alternative to work for offline db?

Help would be Appreciated!!

xTMNTxRaphaelx
  • 1,387
  • 3
  • 11
  • 14

2 Answers2

0

no, it is not possible you can postprocess your data in javascript

Gabor Dolla
  • 2,680
  • 4
  • 14
  • 13
  • What do you mean by postprocess your data .Sorry,I did not get it. and if it is not possible then can you tell me how to use sqlite without Jaydata.Is there any better alternative? and is it possible to make any function for multiple grouping in Jaydata? – xTMNTxRaphaelx Nov 06 '13 at 09:12
  • to access sqlite from javascript has a standardized api, you can read it here: http://www.w3.org/TR/webdatabase/ and you can find many examples on the internet by postprocessing I meant that you get back your data not groupped and you group them yourself from javascript – Gabor Dolla Nov 06 '13 at 10:00
  • Sir,did you mean that I get my data from database and after getting whole data then use my logics to group them using functions. Example: Get the data using "db.tablename.toArray();" and then apply functionality on the data? – xTMNTxRaphaelx Nov 06 '13 at 10:15
0

In SQLite provider - JayData:

The JayData added value

The SQLite / WebSQL provider is one of our most developed and used providers, allowing you to make use of the full power of the JavaScript Language Query (JSLQ).

So, JayData is used in this context to avoid making you write SQL!

If you pretend so, use directly!

LS_ᴅᴇᴠ
  • 10,823
  • 1
  • 23
  • 46
  • Sir,I agree with you that SQLite / WebSQL provider is one of our most developed and used providers.But my question is how can I group data using JSLQ when there is no function available for the same. – xTMNTxRaphaelx Nov 06 '13 at 10:20
  • Ok... You should clarify your question: "is it possible to write sql / sqlite queries using Jaydata" doesn't seams to be your real question! – LS_ᴅᴇᴠ Nov 06 '13 at 10:40
  • It was my real question and I got the answer as "No,it is not possible". – xTMNTxRaphaelx Nov 06 '13 at 10:43
  • So, you should mark that answer as correct. New questions should be posted again. – LS_ᴅᴇᴠ Nov 06 '13 at 10:44
  • I did not understand that why Jaydata+Sqlite is so popular if it does not meet the needs. I was not satisfied tats why.I got the answer but not the solution to my problem. – xTMNTxRaphaelx Nov 06 '13 at 10:44