Class: OrientDB::DocumentDatabasePool

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

Class Method Summary collapse

Class Method Details

.close_current_threadObject



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_connectionObject



144
145
146
# File 'lib/orientdb/database.rb', line 144

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