Class: OrientDB::DocumentDatabase
Class Method Summary
collapse
#all, #all_in_class, #all_in_cluster, #create_class, #drop_class, #find_by_rid, #find_by_rids, #first, #get_class, #get_or_create_class, #migrate_class, #prepare_sql_command, #prepare_sql_query, #quote, #recreate_class, #run_command, #schema
Class Method Details
.close_current_thread ⇒ Object
127
128
129
|
# File 'lib/orientdb/database.rb', line 127
def self.close_current_thread
Thread.current[:orientdb_connection] && Thread.current[:orientdb_connection].close
end
|
.connect(database_url, username, password) ⇒ Object
115
116
117
|
# File 'lib/orientdb/database.rb', line 115
def self.connect(database_url, username, password)
new(database_url).open(username, password)
end
|
.connect_current_thread(database_url, username, password) ⇒ Object
123
124
125
|
# File 'lib/orientdb/database.rb', line 123
def self.connect_current_thread(database_url, username, password)
Thread.current[:orientdb_connection] = connect database_url, username, password
end
|
.create(database_url) ⇒ Object
111
112
113
|
# File 'lib/orientdb/database.rb', line 111
def self.create(database_url)
new(database_url).create
end
|
.current_thread_connection ⇒ Object
119
120
121
|
# File 'lib/orientdb/database.rb', line 119
def self.current_thread_connection
Thread.current[:orientdb_connection]
end
|