خرید بک لینک

Vote count: 0

I don't quit understand joins at all and unfortunately there is very few documentation about it in german. And in my special case i also don't really understand the driver.

So i have a table 'categories' and there i have two docs:

{"id":1, "title":"Category 1"}
{"id":2, "title":"Category 2"}

Than i have a second table 'forums' and there i have three docs:

{"id":1, "title":"Forum 1", "categoryId":1}
{"id":2, "title":"Forum 2", "categoryId":1}
{"id":3, "title":"Forum 3", "categoryId":2}

What i want as an result is:

[{"id":1, "title":"Category 1", "forums":[{"id":1, "title":"Forum 1"},{"id":2, "title":"Forum 2"}]}, {"id":2, "title":"Category 2", "forums":[{"id":3, "title":"Forum 3"}]}]

I know that RethinkDB hasn't a to big community especially in Go, therefore it would also help me if you tell how the SQL command for that would be.

And if there is a Go developer who is in common with the RethinkDB driver maybe you can help be find a solution with Go. Because what i also don't understand is how i can translate this JavaScript code (https://www.rethinkdb.com/api/javascript/#ier_join) to Go, since the arguments (marvelRow, dcRow) in the function need declarations in Go, but i have no idea which.

I am very glad for very hint! Bene

asked 2 mins ago

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 20 ارديبهشت 1395 ساعت: 0:14

صفحه بندی