Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean-up, esp. in documentation #27

Open
a1russell opened this issue Feb 19, 2015 · 8 comments
Open

Clean-up, esp. in documentation #27

a1russell opened this issue Feb 19, 2015 · 8 comments

Comments

@a1russell
Copy link

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?

@kclay
Copy link
Owner

kclay commented Feb 19, 2015

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.

@a1russell
Copy link
Author

Great; thanks!

@ajrnz
Copy link

ajrnz commented Mar 25, 2015

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.

@kclay
Copy link
Owner

kclay commented Mar 25, 2015

@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:

  1. Getting Started (sbt repo, imports, connection modes (blocking/async)
  2. Type Safety ( some pitfalls/unsupported and converting between types)
  3. Serialization (How it works and how to add custom parsers)
  4. Sequences/Streams (map/contactMap, how to add more support if needed)
  5. Querying (read/write, what the Document class is for, working with responses, lazy evaluations, future improvements)
  6. Differences in api calls from rethinkdb.com/api (how to work with indexes, term options)

anything else I'm over looking?

@ajrnz
Copy link

ajrnz commented Mar 25, 2015

No, that sounds good. I'll give you some more feedback when I've had a look. Thanks.

@polymorfiq
Copy link

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.

@kclay
Copy link
Owner

kclay commented Apr 25, 2015

@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]

@polymorfiq
Copy link

Thank you very much! This is very helpful.

On Apr 25, 2015, at 8:45 AM, Keyston notifications@github.com 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants