Class: OrientdbBinary::Server
Instance Attribute Summary
Attributes inherited from OrientdbBase
#protocol, #session, #socket
Class Method Summary
collapse
Instance Method Summary
collapse
#close, #connected?, #disconnect, #initialize
Class Method Details
.connect(options) ⇒ Object
14
15
16
|
# File 'lib/orientdb_binary/server.rb', line 14
def self.connect(options)
Server.new(options)
end
|
Instance Method Details
#db_create(name, type, storage) ⇒ Object
34
35
36
|
# File 'lib/orientdb_binary/server.rb', line 34
def db_create(name, type, storage)
OrientdbBinary::Protocols::DbCreate.new(session: session, name: name, type: type, storage: storage).process(socket)
end
|
#db_drop(name, storage) ⇒ Object
38
39
40
|
# File 'lib/orientdb_binary/server.rb', line 38
def db_drop(name, storage)
OrientdbBinary::Protocols::DbDrop.new(session: session, name: name, storage: storage).process(socket)
end
|
#db_exists?(name) ⇒ Boolean
29
30
31
32
|
# File 'lib/orientdb_binary/server.rb', line 29
def db_exists?(name)
answer = OrientdbBinary::Protocols::DbExist.new(session: session, database: name).process(socket)
answer[:exists] == 1
end
|
#db_freeze(name, storage) ⇒ Object
46
47
48
|
# File 'lib/orientdb_binary/server.rb', line 46
def db_freeze(name, storage)
OrientdbBinary::Protocols::DbFreeze.new(session: session, name: name, storage: storage).process(socket)
end
|
#db_release(name, storage) ⇒ Object
50
51
52
|
# File 'lib/orientdb_binary/server.rb', line 50
def db_release(name, storage)
OrientdbBinary::Protocols::DbRelease.new(session: session, name: name, storage: storage).process(socket)
end
|
#get_config(key) ⇒ Object
#set_config(key, value) ⇒ Object
58
59
60
|
# File 'lib/orientdb_binary/server.rb', line 58
def set_config(key, value)
OrientdbBinary::Protocols::ConfigSet.new(session: session, option_key: key.to_s, option_value: value.to_s).process(socket)
end
|
#shutdown ⇒ Object
66
67
68
|
# File 'lib/orientdb_binary/server.rb', line 66
def shutdown
OrientdbBinary::Protocols::Shutdown.new(session: session, user: @options[:user], password: @options[:password]).process(socket)
end
|