Results 130 comments of Daniel Mewes

Thanks for the pull request @thomseddon ! I added one comment, but otherwise this looks good to me.

It's actually an `ArrayObject`, so you can use it just like an array without any casting. This should work: ``` php if ($res['errors'] !== 0) { return $res; } ```

We could slightly improve this and set the `ARRAY_AS_PROPS` flag (http://php.net/manual/en/class.arrayobject.php#arrayobject.constants.array-as-props). That would make your example `$res->errors` work. I'm not sure how this behaves for array indexes that are not...

Oh sorry I forgot that it's still a float. So you'll still need to cast to `(int)`, or use `!=` comparison instead of `!==`.

The ReQL type system doesn't distinguish between floats and integers unfortunately. I'm not sure if there's anything we can do to make this easier.

I think using `!=` is fine in these cases. The values are in a range where the floating point representation is exact. Or am I missing a part of the...

Hi @thijsw . Sorry for my late response. This should already be working. It's just not documented right now. If you run `r\expr(new \DateTime(...))->run($conn)` you should get another `\DateTime` object...

What I meant is just implementing an analogue of this https://github.com/rethinkdb/rethinkdb/issues/4559 . Currently we have the exception types `RqlDriverError` and `RqlServerError`. We should implement subclasses of these corresponding to the...

(in all of the official RethinkDB drivers including the JS one each error type corresponds to one exception class)

Ah, got you. I think it would be better to stay close to the official exception names (so people can look at http://rethinkdb.com/docs/error-types/ and immediately understand what the corresponding exception...