Sql queries, sqlite, data searches

40 views
Skip to first unread message

Markandeya

unread,
May 31, 2013, 1:37:37 AM5/31/13
to unho...@googlegroups.com
Dear Friends of Unhosted Web Apps,
I was so impressed by the super and quick help i received on my first question that i wish to ask another while i am still searching myself.
Is there a way to have a file/folder database, such as sqlite or other, so an app can do lookup searches? No inserts, updates or deletes needed. Just doing a search and getting results locally.
Can one do a text file lookup or get each line to then process?
Thanks very much. Markandeya
 My old mind set is to do database lookups but now that i'm changing to an unhosted web apps mind set how do we go about thinking of this situation?

Markandeya

unread,
May 31, 2013, 3:26:06 AM5/31/13
to unho...@googlegroups.com
I found some possibilities and need to test then out.
Has anyone tried any of these options?

https://github.com/kripken/sql.js
sqlite.js: SQLite for Javascript!
_____________________________________

http://javascriptsql.sourceforge.net/ARCH/en/docs.html#VI.v
   jssql full js from mysql/postgres on its own
___________________________________________________________
http://www.jstorage.info/
  store locally key values even arrays 7kb zipped

Thanks very much. Markandeya
 

Michiel B. de Jong

unread,
May 31, 2013, 8:08:41 AM5/31/13
to unho...@googlegroups.com

Markandeya

unread,
Jun 3, 2013, 3:28:26 AM6/3/13
to unho...@googlegroups.com
Thanks, these projects are very nice. lunrjs may be my winner. I have found https://github.com/jacwright/array-query where you can query a JS array.
Since most of the solutions allowing a sql like query of a table or row set of data are about 1 mb in size i decided to go with an array of objects, the object is a set of row data. Then with the above jacwrite site's 10 kb JS file i will try to query the array with the fairly simple syntax they provide. They allow for chaining of search criteria. I will see if i can search through the object's elements as sql does for columns. Here there is a way to sort an array of objects: http://www.javascriptkit.com/javatutors/arraysort2.shtml
  I may have to do multiple searches or have multiple arrays rather than arrays of objects. I am going to try it out now.
Thanks for all the help and support, Markandeya
Reply all
Reply to author
Forward
0 new messages