module Orientdb4r
This module represents the entry point for using the Ruby OrientDB client.
Constants
- DRIVER_NAME
Driver identification.
- VERSION
Current version.
- VERSION_HISTORY
Version history.
- logger
Configuration of logging.
Attributes
logger[RW]
Logger used for logging output
Public Class Methods
client(options={})
click to toggle source
Gets a new database client or an existing for the current thread.
options¶ ↑
* :instance => :new * :binary => true * :connection_library => :restclient | :excon
# File lib/orientdb4r.rb, line 36 def client options={} if :new == options[:instance] options.delete :instance return options.delete(:binary) ? BinClient.new(options) : RestClient.new(options) end Thread.exclusive { client = options.delete(:binary) ? BinClient.new(options) : RestClient.new(options) Thread.current[:orientdb_client] ||= client #Thread.current[:orientdb_client] ||= BinClient.new options } end