Class: Safrano::OrderBase

Inherits:
Object
  • Object
show all
Defined in:
lib/odata/collection_order.rb

Overview

base class for ordering

Direct Known Subclasses

Order

Constant Summary collapse

EmptyOrder =

re-useable empty ordering (idempotent)

new.freeze

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.factory(orderstr, jh) ⇒ Object

input : the OData order string returns a Order object that should have a apply_to(cx) method



14
15
16
# File 'lib/odata/collection_order.rb', line 14

def self.factory(orderstr, jh)
  orderstr.nil? ? EmptyOrder : MultiOrder.new(orderstr, jh)
end

Instance Method Details

#apply_to_dataset(dtcx) ⇒ Object



26
27
28
# File 'lib/odata/collection_order.rb', line 26

def apply_to_dataset(dtcx)
  dtcx
end

#empty?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/odata/collection_order.rb', line 18

def empty?
  true
end

#parse_error?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/odata/collection_order.rb', line 22

def parse_error?
  false
end