Module: Rfm::Fmpxmlresult::Resultset
- Defined in:
- lib/rfm/utilities/fmpxmlresult.rb
Instance Method Summary collapse
- #datasource ⇒ Object
- #date_format ⇒ Object
- #error ⇒ Object
- #fields ⇒ Object
- #foundset_count ⇒ Object
- #meta ⇒ Object
- #portals ⇒ Object
- #records ⇒ Object
- #resultset ⇒ Object
- #table ⇒ Object
- #time_format ⇒ Object
- #timestamp_format ⇒ Object
- #total_count ⇒ Object
Instance Method Details
#datasource ⇒ Object
16 17 18 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 16 def datasource self['FMPXMLRESULT']['DATABASE'] end |
#date_format ⇒ Object
28 29 30 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 28 def date_format Rfm.convert_date_time_format(datasource['DATEFORMAT'].to_s) end |
#error ⇒ Object
12 13 14 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 12 def error self['FMPXMLRESULT']['ERRORCODE']['__content__'].to_i end |
#fields ⇒ Object
59 60 61 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 59 def fields ['FIELD'].rfm_force_array.rfm_extend_members(Field, self) end |
#foundset_count ⇒ Object
41 42 43 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 41 def foundset_count resultset['FOUND'].to_s.to_i end |
#meta ⇒ Object
20 21 22 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 20 def self['FMPXMLRESULT']['METADATA'] end |
#portals ⇒ Object
63 64 65 66 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 63 def portals #meta['relatedset-definition'].rfm_force_array.rfm_extend_members(RelatedsetDefinition) [].rfm_extend_members(RelatedsetDefinition) end |
#records ⇒ Object
54 55 56 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 54 def records resultset['ROW'].rfm_force_array.rfm_extend_members(Record, self) end |
#resultset ⇒ Object
24 25 26 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 24 def resultset self['FMPXMLRESULT']['RESULTSET'] end |
#table ⇒ Object
49 50 51 52 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 49 def table #datasource['table'].to_s 'not-defined' end |
#time_format ⇒ Object
32 33 34 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 32 def time_format Rfm.convert_date_time_format(datasource['TIMEFORMAT'].to_s) end |
#timestamp_format ⇒ Object
36 37 38 39 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 36 def #Rfm.convert_date_time_format(datasource['timestamp-format'].to_s) "#{date_format} #{time_format}" end |
#total_count ⇒ Object
45 46 47 |
# File 'lib/rfm/utilities/fmpxmlresult.rb', line 45 def total_count datasource['RECORDS'].to_s.to_i end |