module Orientdb4r

This module represents the entry point for using the Ruby OrientDB client.

Constants

DRIVER_NAME

Driver identification.

MUTEX_CLIENT
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 40
def client options={}
  if :new == options[:instance]
    options.delete :instance
    return options.delete(:binary) ? Binary::BinClient.new(options) : RestClient.new(options)
  end

  MUTEX_CLIENT.synchronize {
    client = options.delete(:binary) ? Binary::BinClient.new(options) : RestClient.new(options)
    Thread.current[:orientdb_client] ||= client
    #Thread.current[:orientdb_client] ||= BinClient.new options
  }
end