Comment about accepting a string order_by value.
This commit is contained in:
parent
9446d50145
commit
2bde6b4029
@ -43,16 +43,18 @@ module XGen
|
|||||||
# in calls to Collection#find.) Default is 0 (all
|
# in calls to Collection#find.) Default is 0 (all
|
||||||
# records).
|
# records).
|
||||||
#
|
#
|
||||||
# order_by :: If not +nil+, specifies record sort order. May be either
|
# order_by :: If not +nil+, specifies record sort order. May be a
|
||||||
# a hash or an array. If an array, it should be an array
|
# String, Hash, OrderedHash, or Array. If a string, the
|
||||||
# of field names which will all be sorted in ascending
|
# results will be ordered by that field in ascending
|
||||||
# order. If a hash, it may be either a regular Hash or an
|
# order. If an array, it should be an array of field names
|
||||||
# OrderedHash. The keys should be field names, and the
|
# which will all be sorted in ascending order. If a hash,
|
||||||
# values should be 1 (ascending) or -1 (descending). Note
|
# it may be either a regular Hash or an OrderedHash. The
|
||||||
# that if it is a regular Hash then sorting by more than
|
# keys should be field names, and the values should be 1
|
||||||
# one field probably will not be what you intend because
|
# (ascending) or -1 (descending). Note that if it is a
|
||||||
# key order is not preserved. (order_by is called :sort in
|
# regular Hash then sorting by more than one field
|
||||||
# calls to Collection#find.)
|
# probably will not be what you intend because key order
|
||||||
|
# is not preserved. (order_by is called :sort in calls to
|
||||||
|
# Collection#find.)
|
||||||
def initialize(sel={}, return_fields=nil, number_to_skip=0, number_to_return=0, order_by=nil)
|
def initialize(sel={}, return_fields=nil, number_to_skip=0, number_to_return=0, order_by=nil)
|
||||||
@number_to_skip, @number_to_return, @order_by = number_to_skip, number_to_return, order_by
|
@number_to_skip, @number_to_return, @order_by = number_to_skip, number_to_return, order_by
|
||||||
self.selector = sel
|
self.selector = sel
|
||||||
|
Loading…
Reference in New Issue
Block a user