class Graphiti::Adapters::Null

The Null adapter is a ‘pass-through’ adapter. It won’t modify the scope. Useful when your customization does not support all possible configuration (e.g. the service you hit does not support sorting)

Public Instance Methods

average(scope, attr) click to toggle source

(see Adapters::Abstract#average)

# File lib/graphiti/adapters/null.rb, line 191
def average(scope, attr)
  scope
end
base_scope(model) click to toggle source
# File lib/graphiti/adapters/null.rb, line 171
def base_scope(model)
  {}
end
count(scope, attr) click to toggle source

(see Adapters::Abstract#count)

# File lib/graphiti/adapters/null.rb, line 186
def count(scope, attr)
  scope
end
filter_boolean_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 167
def filter_boolean_eq(scope, attribute, value)
  scope
end
filter_date_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 143
def filter_date_eq(scope, attribute, value)
  scope
end
filter_date_gt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 151
def filter_date_gt(scope, attribute, value)
  scope
end
filter_date_gte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 155
def filter_date_gte(scope, attribute, value)
  scope
end
filter_date_lt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 159
def filter_date_lt(scope, attribute, value)
  scope
end
filter_date_lte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 163
def filter_date_lte(scope, attribute, value)
  scope
end
filter_date_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 147
def filter_date_not_eq(scope, attribute, value)
  scope
end
filter_datetime_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 119
def filter_datetime_eq(scope, attribute, value)
  scope
end
filter_datetime_gt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 127
def filter_datetime_gt(scope, attribute, value)
  scope
end
filter_datetime_gte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 131
def filter_datetime_gte(scope, attribute, value)
  scope
end
filter_datetime_lt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 135
def filter_datetime_lt(scope, attribute, value)
  scope
end
filter_datetime_lte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 139
def filter_datetime_lte(scope, attribute, value)
  scope
end
filter_datetime_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 123
def filter_datetime_not_eq(scope, attribute, value)
  scope
end
filter_decimal_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 95
def filter_decimal_eq(scope, attribute, value)
  scope
end
filter_decimal_gt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 103
def filter_decimal_gt(scope, attribute, value)
  scope
end
filter_decimal_gte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 107
def filter_decimal_gte(scope, attribute, value)
  scope
end
filter_decimal_lt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 111
def filter_decimal_lt(scope, attribute, value)
  scope
end
filter_decimal_lte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 115
def filter_decimal_lte(scope, attribute, value)
  scope
end
filter_decimal_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 99
def filter_decimal_not_eq(scope, attribute, value)
  scope
end
filter_float_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 71
def filter_float_eq(scope, attribute, value)
  scope
end
filter_float_gt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 79
def filter_float_gt(scope, attribute, value)
  scope
end
filter_float_gte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 83
def filter_float_gte(scope, attribute, value)
  scope
end
filter_float_lt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 87
def filter_float_lt(scope, attribute, value)
  scope
end
filter_float_lte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 91
def filter_float_lte(scope, attribute, value)
  scope
end
filter_float_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 75
def filter_float_not_eq(scope, attribute, value)
  scope
end
filter_integer_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 47
def filter_integer_eq(scope, attribute, value)
  scope
end
filter_integer_gt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 55
def filter_integer_gt(scope, attribute, value)
  scope
end
filter_integer_gte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 59
def filter_integer_gte(scope, attribute, value)
  scope
end
filter_integer_lt(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 63
def filter_integer_lt(scope, attribute, value)
  scope
end
filter_integer_lte(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 67
def filter_integer_lte(scope, attribute, value)
  scope
end
filter_integer_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 51
def filter_integer_not_eq(scope, attribute, value)
  scope
end
filter_string_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 7
def filter_string_eq(scope, attribute, value)
  scope
end
filter_string_eql(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 11
def filter_string_eql(scope, attribute, value)
  scope
end
filter_string_match_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 39
def filter_string_match_eq(scope, attribute, value)
  scope
end
filter_string_not_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 15
def filter_string_not_eq(scope, attribute, value)
  scope
end
filter_string_not_eql(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 19
def filter_string_not_eql(scope, attribute, value)
  scope
end
filter_string_not_match_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 43
def filter_string_not_match_eq(scope, attribute, value)
  scope
end
filter_string_not_prefix_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 27
def filter_string_not_prefix_eq(scope, attribute, value)
  scope
end
filter_string_not_suffix_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 35
def filter_string_not_suffix_eq(scope, attribute, value)
  scope
end
filter_string_prefix_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 23
def filter_string_prefix_eq(scope, attribute, value)
  scope
end
filter_string_suffix_eq(scope, attribute, value) click to toggle source
# File lib/graphiti/adapters/null.rb, line 31
def filter_string_suffix_eq(scope, attribute, value)
  scope
end
maximum(scope, attr) click to toggle source

(see Adapters::Abstract#sum)

# File lib/graphiti/adapters/null.rb, line 201
def maximum(scope, attr)
  scope
end
minimum(scope, attr) click to toggle source

(see Adapters::Abstract#minimum)

# File lib/graphiti/adapters/null.rb, line 206
def minimum(scope, attr)
  scope
end
order(scope, attribute, direction) click to toggle source

(see Adapters::Abstract#order)

# File lib/graphiti/adapters/null.rb, line 176
def order(scope, attribute, direction)
  scope
end
paginate(scope, current_page, per_page, offset) click to toggle source

(see Adapters::Abstract#paginate)

# File lib/graphiti/adapters/null.rb, line 181
def paginate(scope, current_page, per_page, offset)
  scope
end
resolve(scope) click to toggle source

(see Adapters::Abstract#resolve)

# File lib/graphiti/adapters/null.rb, line 219
def resolve(scope)
  scope
end
save(model) click to toggle source
# File lib/graphiti/adapters/null.rb, line 223
def save(model)
  model.valid? if model.respond_to?(:valid?)
  model
end
sum(scope, attr) click to toggle source

(see Adapters::Abstract#sum)

# File lib/graphiti/adapters/null.rb, line 196
def sum(scope, attr)
  scope
end
transaction(model_class) { || ... } click to toggle source

Since this is a null adapter, just yield @see Adapters::ActiveRecord#transaction @return Result of yield @param [Class] model_class The class we’re operating on

# File lib/graphiti/adapters/null.rb, line 214
def transaction(model_class)
  yield
end