Class: ODPI::Connection

Inherits:
Object
  • Object
show all
Defined in:
lib/odpi/connection.rb

Instance Method Summary collapse

Constructor Details

#initialize(conn, is_standalone) ⇒ Connection

Returns a new instance of Connection.


52
53
54
55
# File 'lib/odpi/connection.rb', line 52

def initialize(conn, is_standalone)
  @conn = conn
  @is_standalone = is_standalone
end

Instance Method Details

#closeObject


57
58
59
# File 'lib/odpi/connection.rb', line 57

def close
  @conn.close(nil, nil)
end

#new_subscription(params) ⇒ Object


61
62
63
# File 'lib/odpi/connection.rb', line 61

def new_subscription(params)
  @conn.new_subscription(params)
end

#prepare(sql, scrollable: false, tag: nil) ⇒ Object


69
70
71
72
# File 'lib/odpi/connection.rb', line 69

def prepare(sql, scrollable: false, tag: nil)
  stmt = @conn.prepare_stmt(scrollable, sql, tag)
  Statement.new(@conn, stmt)
end

#raw_connectionObject


65
66
67
# File 'lib/odpi/connection.rb', line 65

def raw_connection
  @conn
end