rethink-scala
rethink-scala copied to clipboard
Clean-up, esp. in documentation
Hi,
I've been considering trying out RethinkDB. Since Scala is my favorite language, I'd naturally use the Scala driver. However, upon finding this project, I have some reservations about actually using it.
I know it sounds shallow, but I am sure that if I have these reservations, other people will, too. I hope that my honesty does not offend you. Basically, there is a lot of stylistic sloppiness, even in the README file. For example, looking at the "to get started" section, there are a couple of lines commented out. What do they mean, and why are they commented out? Can we just delete them?
There is also a lot of whitespace usage inconsistency that makes the code simply difficult to read.
Looking through the code, I see that these minor issues are not isolated to the README.
Would you be opposed to me (or anyone, really) cleaning some of these things up?
Have at it. Never thought anyone would use this library. And no it doesn't sound shallow, I actually wanted to clean it up a bit but was never of importance for me.
Great; thanks!
I like scala as well and RethinkDB interests me. I think it's quite likely that this library would be used however at the moment there is quite a barrier to entry. I've spent a couple of hours playing with it but can't get it to work either with the dependency 0.4.6 or compiling it myself. I'm sure it's just a question of imports or the examples being out of date but these thinks matter when you are trying to get started. The lack of contact information makes it very difficult to request help.
I'd appreciate the examples being a full scala file (with imports!) which just does some simple things like reading and writing data. If it was part of the project it would always compile.
Happy to help out if I can.
@ajrnz completely understand. I have some time today so I'll be creating a wiki so far I have it broken down to these topics:
- Getting Started (sbt repo, imports, connection modes (blocking/async)
- Type Safety ( some pitfalls/unsupported and converting between types)
- Serialization (How it works and how to add custom parsers)
- Sequences/Streams (map/contactMap, how to add more support if needed)
- Querying (read/write, what the Document class is for, working with responses, lazy evaluations, future improvements)
- Differences in api calls from rethinkdb.com/api (how to work with indexes, term options)
anything else I'm over looking?
No, that sounds good. I'll give you some more feedback when I've had a look. Thanks.
I would like to request an example project or a little more thorough documentation of the methods and how to use them. I might be missing something obvious, but I can't quite figure out how to take a case class, insert it into a table and then get(key) to get it back.
EDIT: Figured it out. These are the main things I was doing wrong if anyone else is confused.
In 0.4.6:
- These are not the same thing and the 2nd one doesn't work: -- r.db("Caching").table("response_cache").insert(response) -- val cache = r.db("Caching").table("response_cache"); cache.insert(response)
- RethinkDB does not support nested primary keys.
- new Version3("localhost", db = "Caching"), db seems to be completely ignored
- The way I was handling get() it would ignore failures. With the incorrect DB ^ I would get nothing
In 0.4.7-SNAPSHOT:
- r.db("myDB").tableAsMyClass does not exist.
Thanks for making this library by the way. I really wanted to use RethinkDB in my Scala cluster as it seems like it is well-designed and has the right priorities. I'm looking forward to watching this library grow.
@fingerco https://github.com/kclay/rethink-scala/blob/master/core/src/test/scala/example/blocking/Tutorial.scala
Also I'll make an issuse for the "db" bug. also its r.db("myDB").table[MyClass]
Thank you very much! This is very helpful.
On Apr 25, 2015, at 8:45 AM, Keyston [email protected] wrote:
@fingerco https://github.com/kclay/rethink-scala/blob/master/core/src/test/scala/example/blocking/Tutorial.scala
Also I'll make an issuse for the "db" bug. also its r.db("myDB").table[MyClass]
— Reply to this email directly or view it on GitHub.