Method: Sequel::SQLite::JSONBaseOp#array_length
- Defined in:
- lib/sequel/extensions/sqlite_json_ops.rb
#array_length(*args) ⇒ Object
Returns an expression for the length of the JSON array, or the JSON array at the given path.
json_op.array_length # json_array_length(json)
json_op.array_length('$[1]') # json_array_length(json, '$[1]')
101 102 103 |
# File 'lib/sequel/extensions/sqlite_json_ops.rb', line 101 def array_length(*args) Sequel::SQL::NumericExpression.new(:NOOP, SQL::Function.new(:json_array_length, self, *args)) end |