Class: Sqlite::QuerySolutionParser
- Inherits:
-
Object
- Object
- Sqlite::QuerySolutionParser
- Defined in:
- lib/query_solution_parser.rb
Instance Method Summary collapse
- #choose(solution) ⇒ Object
-
#parse_test(test) ⇒ Object
Expected input: OpenStruct#{ solution_type: ‘query’, solution_query: ‘select * from motores;’, examples: [ { dataset: “INSERT INTO …nINSERT INTO …” } ] }.
Instance Method Details
#choose(solution) ⇒ Object
20 21 22 |
# File 'lib/query_solution_parser.rb', line 20 def choose(solution) solution end |
#parse_test(test) ⇒ Object
Expected input: OpenStruct#{
solution_type: 'query',
solution_query: 'select * from motores;',
examples: [
{ dataset: "INSERT INTO ...\nINSERT INTO ..." }
]
}
12 13 14 15 16 17 18 |
# File 'lib/query_solution_parser.rb', line 12 def parse_test(test) data = test.examples.map do |item| item[:data] end return test.solution_query, data end |