Module: ROM::SQL::Postgres::Types::LTreeMethods
- Defined in:
- lib/rom/sql/extensions/postgres/types/ltree.rb
Constant Summary collapse
- ASCENDANT =
['(', ' @> ', ')'].freeze
- FIND_ASCENDANT =
['(', ' ?@> ', ')'].freeze
- DESCENDANT =
['(', ' <@ ', ')'].freeze
- FIND_DESCENDANT =
['(', ' ?<@ ', ')'].freeze
- MATCH_ANY =
['(', ' ? ', ')'].freeze
- MATCH_ANY_LQUERY =
['(', ' ?~ ', ')'].freeze
- MATCH_LTEXTQUERY =
['(', ' @ ', ')'].freeze
- MATCH_ANY_LTEXTQUERY =
['(', ' ?@ ', ')'].freeze
Instance Method Summary collapse
Instance Method Details
#match(_type, expr, query) ⇒ Object
260 261 262 263 264 |
# File 'lib/rom/sql/extensions/postgres/types/ltree.rb', line 260 def match(_type, expr, query) Attribute[SQL::Types::Bool].( sql_expr: ::Sequel::SQL::BooleanExpression.new(:~, expr, query) ) end |
#match_any(_type, expr, query) ⇒ Object
266 267 268 269 270 271 |
# File 'lib/rom/sql/extensions/postgres/types/ltree.rb', line 266 def match_any(_type, expr, query) array = build_array_query(query) Attribute[SQL::Types::Bool].( sql_expr: custom_operator_expr(MATCH_ANY, expr, array) ) end |