Class: OrientDB::DocumentDatabasePool

Inherits:
Object
  • Object
show all
Defined in:
lib/orientdb/database.rb

Class Method Summary collapse

Class Method Details

.close_current_threadObject



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_connectionObject



142
143
144
# File 'lib/orientdb/database.rb', line 142

def self.current_thread_connection
  Thread.current[:orientdb_connection]
end