Class: OpenEHR::AQL::Model::AggregateFunctionCall

Inherits:
Object
  • Object
show all
Defined in:
lib/openehr/aql/model/function_call.rb

Overview

aggregateFunctionCall : name=COUNT SYM_LEFT_PAREN (DISTINCT? identifiedPath | SYM_ASTERISK) SYM_RIGHT_PAREN | name=(MIN | MAX | SUM | AVG) SYM_LEFT_PAREN identifiedPath SYM_RIGHT_PAREN ; path is nil only for the COUNT(*) form; distinct is only ever true for COUNT (the grammar doesn't allow DISTINCT on MIN/MAX/SUM/AVG).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, path: nil, distinct: false) ⇒ AggregateFunctionCall

Returns a new instance of AggregateFunctionCall.



11
12
13
14
15
16
# File 'lib/openehr/aql/model/function_call.rb', line 11

def initialize(name:, path: nil, distinct: false)
  @name = name
  @path = path
  @distinct = distinct
  freeze
end

Instance Attribute Details

#distinctObject (readonly)

Returns the value of attribute distinct.



9
10
11
# File 'lib/openehr/aql/model/function_call.rb', line 9

def distinct
  @distinct
end

#nameObject (readonly)

Returns the value of attribute name.



9
10
11
# File 'lib/openehr/aql/model/function_call.rb', line 9

def name
  @name
end

#pathObject (readonly)

Returns the value of attribute path.



9
10
11
# File 'lib/openehr/aql/model/function_call.rb', line 9

def path
  @path
end