Class: AlgebraDB::Value::Array

Inherits:
AlgebraDB::Value show all
Defined in:
lib/algebra_db/value/array.rb

Overview

Represents Postgres arrays with an inner type.

Defined Under Namespace

Modules: ArrayOps Classes: Decoder

Constant Summary collapse

Text =

Convenience constants

of(::AlgebraDB::Value::Text)
Double =
of(::AlgebraDB::Value::Double)
Integer =
of(::AlgebraDB::Value::Integer)
JSONB =
of(::AlgebraDB::Value::JSONB)

Instance Attribute Summary

Attributes inherited from AlgebraDB::Value

#builder

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from AlgebraDB::Value

#render_syntax, #to_select_item

Methods included from Operations::Definition

#binop

Class Method Details

.of(other) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/algebra_db/value/array.rb', line 6

def self.of(other)
  Class.new(other) do
    include AlgebraDB::Value::Array::ArrayOps

    def decoder
      AlgebraDB::Value::Array::Decoder.new(super)
    end
  end
end

Instance Method Details

#decoderObject



44
45
46
# File 'lib/algebra_db/value/array.rb', line 44

def decoder
  AlgebraDB::Value::Array::Decoder.new(builder.decoder)
end