Aris Miliotis
Posts: 0
Joined: Fri May 30, 2014 4:52 pm

hashtable

I am self taught programmer so forgive me if use the wrong terms.
Want I want is to create a hashtable, I think that's what is called....

I want to create a database that I can check the column names and add a row with 0 except at the appropriate column, 1...
I don't mind creating all my columns manually and adding them the same script, to check for the column name against my_string, so I need a way to give to my javascript the name of its database column...

even better version, is there a way to create database columns from a javascript?

thanks :)

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

hashtable

Hello Aris,

What database do you mean? Could you please clarify what result you are going to achieve? Provide more details, please.

Aris Miliotis
Posts: 0
Joined: Fri May 30, 2014 4:52 pm

hashtable

I mean a database on appery.io, a collection I created there...
I am trying to have a presorted database so I can find things faster...

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

hashtable

Aris,

About "presorted database" - you can create index for column. You can't add column to custom collection in database from javascript. Could you explain your goals more detailed and we will try helping you.

Aris Miliotis
Posts: 0
Joined: Fri May 30, 2014 4:52 pm

hashtable

OK, now I got a new problem :( and I will explain the previous one too... :)

So I need to create a database with locations of each of my users... I am using appery's geolocation service for that, it is gps based right? not wifi or cell?...? this is the "new" problem, I read somewhere that geolocation is not gps based...

now to the database issue, I need to store all my users on a database and then find for each user the closest other users using a selection algorithm I wrote. this is why I wanted to do the hash table so that I don't have to look through the WHOLE database for the closest users, but just a small sub collection defined by a hashtable...
On this note though, do I need to do this with my own database or is there a way to do it on Google's database?

Thank you,
aris.

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

hashtable

Hello Aris,

There are two ways to retrieve position:

Aris Miliotis
Posts: 0
Joined: Fri May 30, 2014 4:52 pm

hashtable

Don't need this anymore, I figured out how to make a query on geopoints in my database and that will suffice for now... BTW not all the example of geopoint searches you provide work, some give an error....

I asked this somewhere else, but I'll ask here too... once I do my query how do I handle the response? In the test environment I get back this weird array, looks like JSON, and I don't know how to save parts of that array, the _ids and locations on local data and manipulate them....

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

hashtable

Return to “Issues”