azukiapp / elixir-rethinkdb

A Elixir client driver for RethinkDB.
Apache License 2.0
43 stars 9 forks source link

Add api from rql datetime #7

Open nuxlli opened 11 years ago

dbettin commented 11 years ago

What is your plan for the datetime(s)? Are you looking at some of the new and upcoming elixir libraries?

nuxlli commented 11 years ago

At the moment this is not the idea, on the other hand could have come to be an abstraction future, including the https://github.com/alco/elixir-datetime, watching to see how it goes these implementations.

For now would just implement the interface datatime the RQL: http://www.rethinkdb.com/api/#js:dates_and_times-now

dbettin commented 11 years ago

The default drivers all store the datetime(s) in their respective native types; I would assume this driver would do the same.

What is your timeline for starting work on this?

Again, thanks for the great library!

nuxlli commented 11 years ago

You're right, had not yet watched it.

Therefore I believe that the most feasible way is to use the elixir-datetime, do not know if there were any plans to make this part of the elixir standard library's, but either way future adjustments should be simple of implement.

On the other hand I have tried to keep the driver as pure as possible, avoiding dependence on third parties. I've been looking at the code https://github.com/exlir-lang/ecto, and in case they support the datetime is very simple and was done with simple records: https://github.com/elixir-lang/ecto/blob/master/lib/ecto.ex

I have no plans to work on this feature for now, my focus is on the use of the driver in another project, and perhaps one of rethinkdb adapter for ecto. Feel free to contribute to this part if you wish.