Class: DataObjects::Command

Inherits:
Object show all
Defined in:
lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(connection, text) ⇒ Command

initialize creates a new Command object

Raises:

  • (ArgumentError)


7
8
9
10
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 7

def initialize(connection, text)
  raise ArgumentError.new("+connection+ must be a DataObjects::Connection") unless DataObjects::Connection === connection
  @connection, @text = connection, text
end

Instance Attribute Details

#connectionObject (readonly)

Returns the value of attribute connection.



4
5
6
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 4

def connection
  @connection
end

Instance Method Details

#execute_non_query(*args) ⇒ Object

Raises:

  • (NotImplementedError)


12
13
14
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 12

def execute_non_query(*args)
  raise NotImplementedError.new
end

#execute_reader(*args) ⇒ Object

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 16

def execute_reader(*args)
  raise NotImplementedError.new
end

#set_types(column_types) ⇒ Object

Raises:

  • (NotImplementedError)


20
21
22
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 20

def set_types(column_types)
  raise NotImplementedError.new
end

#to_sObject



24
25
26
# File 'lib/gems/data_objects-0.9.10.1/lib/data_objects/command.rb', line 24

def to_s
  @text
end