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
150 151 152 |
# File 'lib/orientdb/database.rb', line 150 def self.close_current_thread Thread.current[:orientdb_connection] && Thread.current[:orientdb_connection].close end |
.connect(url, username, password) ⇒ Object
138 139 140 |
# File 'lib/orientdb/database.rb', line 138 def self.connect(url, username, password) global.acquire(url, username, password) end |
.connect_current_thread(database_url, username, password) ⇒ Object
146 147 148 |
# File 'lib/orientdb/database.rb', line 146 def self.connect_current_thread(database_url, username, password) Thread.current[:orientdb_connection] = connect database_url, username, password end |
.current_thread_connection ⇒ Object
142 143 144 |
# File 'lib/orientdb/database.rb', line 142 def self.current_thread_connection Thread.current[:orientdb_connection] end |