Class: OrientDB::DocumentDatabasePool
- Inherits:
-
Object
- Object
- OrientDB::DocumentDatabasePool
- Defined in:
- lib/orientdb/database.rb
Class Method Summary collapse
- .close_current_thread ⇒ Object
- .connect(url, username, password) ⇒ Object
- .connect_current_thread(database_url, username, password) ⇒ Object
- .current_thread_connection ⇒ Object
Class Method Details
.close_current_thread ⇒ Object
152 153 154 |
# File 'lib/orientdb/database.rb', line 152 def self.close_current_thread Thread.current[:orientdb_connection] && Thread.current[:orientdb_connection].close end |
.connect(url, username, password) ⇒ Object
140 141 142 |
# File 'lib/orientdb/database.rb', line 140 def self.connect(url, username, password) global.acquire(url, username, password) end |
.connect_current_thread(database_url, username, password) ⇒ Object
148 149 150 |
# File 'lib/orientdb/database.rb', line 148 def self.connect_current_thread(database_url, username, password) Thread.current[:orientdb_connection] = connect database_url, username, password end |
.current_thread_connection ⇒ Object
144 145 146 |
# File 'lib/orientdb/database.rb', line 144 def self.current_thread_connection Thread.current[:orientdb_connection] end |