Module: Aqueduct::Wrapper
- Included in:
- Aqueduct::Wrappers::Developer
- Defined in:
- lib/aqueduct/wrapper.rb
Class Method Summary collapse
Instance Method Summary collapse
- #column_values(table, column) ⇒ Object
- #concept_tables(query_concept) ⇒ Object
- #conditions(query_concepts) ⇒ Object
- #connect ⇒ Object
-
#connected? ⇒ Boolean
Returns the Connection Status of the underlying data source.
- #count(query_concepts, conditions, tables, join_conditions, concept_to_count) ⇒ Object
- #disconnect ⇒ Object
- #external_concept_information(external_key = '') ⇒ Object
- #external_concepts(folder = '', search_term = '') ⇒ Object
- #get_all_values_for_column(table, column) ⇒ Object
- #initialize(source, current_user) ⇒ Object
- #query(sql_statement) ⇒ Object
- #sql_codes ⇒ Object
-
#table_columns(table) ⇒ Object
Returns an array of columns for a given table.
-
#tables ⇒ Object
Returns an array of tables.
- #use_sql? ⇒ Boolean
Class Method Details
Instance Method Details
#column_values(table, column) ⇒ Object
55 56 57 |
# File 'lib/aqueduct/wrapper.rb', line 55 def column_values(table, column) { result: [], error: "Unknown Wrapper: #{@source.wrapper}" } end |
#concept_tables(query_concept) ⇒ Object
71 72 73 |
# File 'lib/aqueduct/wrapper.rb', line 71 def concept_tables(query_concept) { result: [], error: "Unknown Wrapper: #{@source.wrapper}" } end |
#conditions(query_concepts) ⇒ Object
75 76 77 |
# File 'lib/aqueduct/wrapper.rb', line 75 def conditions(query_concepts) { conditions: '', error: "Unknown Wrapper: #{@source.wrapper}" } end |
#connect ⇒ Object
16 17 18 |
# File 'lib/aqueduct/wrapper.rb', line 16 def connect @db_connection end |
#connected? ⇒ Boolean
Returns the Connection Status of the underlying data source.
37 38 39 |
# File 'lib/aqueduct/wrapper.rb', line 37 def connected? { result: false, error: "Unknown Wrapper: #{@source.wrapper}" } end |
#count(query_concepts, conditions, tables, join_conditions, concept_to_count) ⇒ Object
59 60 61 |
# File 'lib/aqueduct/wrapper.rb', line 59 def count(query_concepts, conditions, tables, join_conditions, concept_to_count) { result: 0, error: "Unknown Wrapper: #{@source.wrapper}" } end |
#disconnect ⇒ Object
20 21 22 |
# File 'lib/aqueduct/wrapper.rb', line 20 def disconnect true end |
#external_concept_information(external_key = '') ⇒ Object
67 68 69 |
# File 'lib/aqueduct/wrapper.rb', line 67 def external_concept_information(external_key = '') { result: {}, error: "Unknown Wrapper: #{@source.wrapper}" } end |
#external_concepts(folder = '', search_term = '') ⇒ Object
63 64 65 |
# File 'lib/aqueduct/wrapper.rb', line 63 def external_concepts(folder = '', search_term = '') { result: [], error: '' }#, error: "Unknown Wrapper: #{@source.wrapper}"} end |
#get_all_values_for_column(table, column) ⇒ Object
51 52 53 |
# File 'lib/aqueduct/wrapper.rb', line 51 def get_all_values_for_column(table, column) { values: [], error: "Unknown Wrapper: #{@source.wrapper}" } end |
#initialize(source, current_user) ⇒ Object
10 11 12 13 14 |
# File 'lib/aqueduct/wrapper.rb', line 10 def initialize(source, current_user) @source = source @current_user = current_user @db_connection = nil end |
#query(sql_statement) ⇒ Object
24 25 26 |
# File 'lib/aqueduct/wrapper.rb', line 24 def query(sql_statement) [[],0] end |
#sql_codes ⇒ Object
32 33 34 |
# File 'lib/aqueduct/wrapper.rb', line 32 def sql_codes { text: '', numeric: '', open: '', close: '' } end |
#table_columns(table) ⇒ Object
Returns an array of columns for a given table
47 48 49 |
# File 'lib/aqueduct/wrapper.rb', line 47 def table_columns(table) { columns: [], error: "Unknown Wrapper: #{@source.wrapper}" } end |
#tables ⇒ Object
Returns an array of tables
42 43 44 |
# File 'lib/aqueduct/wrapper.rb', line 42 def tables { result: [], error: "Unknown Wrapper: #{@source.wrapper}" } end |
#use_sql? ⇒ Boolean
28 29 30 |
# File 'lib/aqueduct/wrapper.rb', line 28 def use_sql? true end |