Class: Arproxy::QueryContext

Inherits:
Object
  • Object
show all
Defined in:
lib/arproxy/query_context.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(raw_connection:, execute_method_name:, with_binds:, name: nil, binds: [], kwargs: {}) ⇒ QueryContext

Returns a new instance of QueryContext.



5
6
7
8
9
10
11
12
# File 'lib/arproxy/query_context.rb', line 5

def initialize(raw_connection:, execute_method_name:, with_binds:, name: nil, binds: [], kwargs: {})
  @raw_connection = raw_connection
  @execute_method_name = execute_method_name
  @with_binds = with_binds
  @name = name
  @binds = binds
  @kwargs = kwargs
end

Instance Attribute Details

#bindsObject

Returns the value of attribute binds.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def binds
  @binds
end

#execute_method_nameObject

Returns the value of attribute execute_method_name.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def execute_method_name
  @execute_method_name
end

#kwargsObject

Returns the value of attribute kwargs.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def kwargs
  @kwargs
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def name
  @name
end

#raw_connectionObject

Returns the value of attribute raw_connection.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def raw_connection
  @raw_connection
end

#with_bindsObject

Returns the value of attribute with_binds.



3
4
5
# File 'lib/arproxy/query_context.rb', line 3

def with_binds
  @with_binds
end

Instance Method Details

#with_binds?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/arproxy/query_context.rb', line 14

def with_binds?
  !!@with_binds
end