Module: Yuriita

Defined in:
lib/yuriita.rb,
lib/yuriita/lexer.rb,
lib/yuriita/query.rb,
lib/yuriita/route.rb,
lib/yuriita/table.rb,
lib/yuriita/option.rb,
lib/yuriita/parser.rb,
lib/yuriita/result.rb,
lib/yuriita/router.rb,
lib/yuriita/runner.rb,
lib/yuriita/search.rb,
lib/yuriita/routing.rb,
lib/yuriita/version.rb,
lib/yuriita/executor.rb,
lib/yuriita/assembler.rb,
lib/yuriita/collection.rb,
lib/yuriita/errors/error.rb,
lib/yuriita/configuration.rb,
lib/yuriita/query_builder.rb,
lib/yuriita/search_filter.rb,
lib/yuriita/clauses/filter.rb,
lib/yuriita/clauses/search.rb,
lib/yuriita/dynamic_filter.rb,
lib/yuriita/inputs/keyword.rb,
lib/yuriita/or_combination.rb,
lib/yuriita/selects/single.rb,
lib/yuriita/and_combination.rb,
lib/yuriita/clauses/dynamic.rb,
lib/yuriita/clauses/identity.rb,
lib/yuriita/selects/multiple.rb,
lib/yuriita/definitions/scope.rb,
lib/yuriita/expression_filter.rb,
lib/yuriita/inputs/expression.rb,
lib/yuriita/selects/exclusive.rb,
lib/yuriita/definitions/single.rb,
lib/yuriita/errors/parse_error.rb,
lib/yuriita/definitions/dynamic.rb,
lib/yuriita/definitions/multiple.rb,
lib/yuriita/definitions/exclusive.rb,
lib/yuriita/selects/all_or_explicit.rb,
lib/yuriita/errors/collection/action_not_found.rb

Defined Under Namespace

Modules: Clauses, Definitions, Inputs, Routing, Selects Classes: AndCombination, Assembler, Collection, Configuration, DynamicFilter, Error, Executor, ExpressionFilter, Lexer, Option, OrCombination, ParseError, Parser, Query, QueryBuilder, Result, Route, Router, Runner, Search, SearchFilter, Table

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.build_query(input) ⇒ Object



16
17
18
# File 'lib/yuriita.rb', line 16

def self.build_query(input)
  QueryBuilder.build(input)
end

.filter(relation, input, configuration) ⇒ Object



8
9
10
11
12
13
14
# File 'lib/yuriita.rb', line 8

def self.filter(relation, input, configuration)
  query = build_query(input)
  relation = Runner.new(relation: relation, configuration: configuration).run(query)
  Result.success(relation)
rescue ParseError => exception
  Result.error(exception)
end