0

I'm putting together a form in which it is possible to perform a query which is informing the url fields return. The relationship of the tables is as follows:

 TB_USER> TB_PEOPLE> TB_PHONE

  I'm going through the following url structure for the fields that should return:

http://localhost?fields=ID,USERNAME,TB_PEOPLE.fields(FIRST, LAST, TB_PEOPLE.TB_PHONE.fields(PHONE)

Note that I am returning fields from related table stating "table name". Fields (fields from related table) that can be recursive.

But I am in doubt how could parse that string without losing the idea of ​​relationship.

Thank you.

1
  • What does your parser look like? Can you post the code you already have? Commented Oct 24, 2013 at 17:46

1 Answer 1

1

I would advise to use the POST method instead of sending it in such a reconstituted url. It is more secure than showing all the structure of your database.

Sign up to request clarification or add additional context in comments.

2 Comments

POST isn't more secure that GET. You would only be hidding the structure from the URL Is either GET or POST more secure that the other This is a query so it should be a GET
Well, the idea came from the Facebook API (developers.facebook.com/docs/graph-api), we are starting a project with RESTFUL and the idea was to create an application server that would return to simple queries dynamically without the need to develop methods specific to them. I could not get an idea of ​​how to structure the data, I thought I'd do a url.Split (',') but in some cases it might not know which table belongs particular field.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.