struct RethinkDB::Datum
- RethinkDB::Datum
- Struct
- Value
- Object
Defined in:
driver/connection.crConstructors
Instance Method Summary
-
#!=(other)
Returns
true
if this object is not equal to other. -
#==(other)
Returns
true
if this struct is equal to other. - #array
- #array?
- #bool
- #bool?
- #bytes
- #bytes?
- #datum
- #float
- #float?
-
#hash
Generates an
UInt64
hash value for this object. - #hash?
- #inspect(io)
- #int32
- #int32?
- #int64
- #int64?
- #string
- #string?
- #to_json(io)
- #value : Array(Datum) | Bool | Float64 | Hash(String, Datum) | Int64 | Int32 | Time | String | Nil | Bytes
Instance methods inherited from class Object
!=(other : RethinkDB::DSL::R)
!=,
%(other : RethinkDB::DSL::R)
%,
&(other : RethinkDB::DSL::R)
&,
*(other : RethinkDB::DSL::R)
*,
+(other : RethinkDB::DSL::R)
+,
-(other : RethinkDB::DSL::R)
-,
/(other : RethinkDB::DSL::R)
/,
<(other : RethinkDB::DSL::R)
<,
<=(other : RethinkDB::DSL::R)
<=,
==(other : RethinkDB::DSL::R)
==,
>(other : RethinkDB::DSL::R)
>,
>=(other : RethinkDB::DSL::R)
>=,
|(other : RethinkDB::DSL::R)
|
Constructor Detail
Instance Method Detail
Returns true
if this object is not equal to other.
By default this method is implemented as !(self == other)
so there's no need to override this unless there's a more efficient
way to do it.
Returns true
if this struct is equal to other.
Both structs' instance vars are compared to each other. Thus, two structs are considered equal if each of their instance variables are equal. Subclasses should override this method to provide specific equality semantics.
struct Point
def initialize(@x : Int32, @y : Int32)
end
end
p1 = Point.new 1, 2
p2 = Point.new 1, 2
p3 = Point.new 3, 4
p1 == p2 # => true
p1 == p3 # => false
Generates an UInt64
hash value for this object.
This method must have the property that a == b
implies a.hash == b.hash
.
The hash value is used along with #==
by the Hash
class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher)
,
though usually the macro def_hash
can be used to generate this method.