Module: Orientdb4r
- Defined in:
- lib/orientdb4r.rb,
lib/orientdb4r/rid.rb,
lib/orientdb4r/node.rb,
lib/orientdb4r/utils.rb,
lib/orientdb4r/client.rb,
lib/orientdb4r/version.rb,
lib/orientdb4r/rest/node.rb,
lib/orientdb4r/bin/client.rb,
lib/orientdb4r/rest/model.rb,
lib/orientdb4r/rest/client.rb,
lib/orientdb4r/chained_error.rb,
lib/orientdb4r/load_balancing.rb,
lib/orientdb4r/rest/excon_node.rb,
lib/orientdb4r/rest/restclient_node.rb
Overview
This module represents the entry point for using the Ruby OrientDB client.
Defined Under Namespace
Modules: Aop2, ChainedError, DocumentMetadata, HashExtension, OClass, Property, Utils Classes: BinClient, Client, ConnectionError, DataError, ExconNode, LBStrategy, Node, NodeError, NotFoundError, OrientdbError, RestClient, RestClientNode, RestNode, Rid, RoundRobin, Sequence, ServerError, UnauthorizedError
Constant Summary collapse
- VERSION_HISTORY =
Version history.
[ ['0.5.1', '2015-03-26', "Enh #39, PR #40"], ['0.5.0', '2015-03-03', "Compatible with OrientDB v2.x, PR #31, PR #32, PR #33"], ['0.4.1', '2013-09-03', "Enh #24, Enh #26, Enh #27"], ['0.4.0', '2013-08-14', "Closed gap between this driver and OrientDB v1.4.0+; Enh #20, BF #25"], ['0.3.3', '2012-12-16', "Enh #18, Enh #19"], ['0.3.2', '2012-11-02', "Enh #13, Enh #16"], ['0.3.1', '2012-08-27', "Timeout for reuse of dirty nodes in load balancing; BF #14, BF #15"], ['0.3.0', '2012-08-01', "Added support for cluster of distributed servers + load balancing"], ['0.2.10', '2012-07-21', "Experimental support for Excon HTTP library with Keep-Alive connection"], ['0.2.9', '2012-07-18', "Added feature Client#delete_database, New class Rid"], ['0.2.8', '2012-07-16', "New exception handling, added feature Client#create_class(:properties)"], ['0.2.7', '2012-07-07', "Added method Client#class_exists?"], ['0.2.6', '2012-07-03', "BF #8, BF #6"], ['0.2.5', '2012-07-01', "Added 'get_database' into database CRUD"], # v-- https://groups.google.com/forum/?fromgroups#!topic/orient-database/5MAMCvFavTc ['0.2.4', '2012-06-26', "Added session management"], ['0.2.3', '2012-06-24', "Documents received by a query are kind of Orientdb4r::DocumentMetadata"], # v-- https://groups.google.com/forum/?fromgroups#!topic/orient-database/jK4EZd068AE # v-- https://groups.google.com/forum/?fromgroups#!topic/orient-database/nJOAsgwSnKI ['0.2.2', '2012-06-23', "Added support for server version detection [r5913]"], ['0.2.1', '2012-06-19', "Fixed linked property definition"], ['0.2.0', '2012-06-12', "Introduces document's CRUD operations"], ['0.1.2', '2012-06-10', 'Introduces new OClass module'], ['0.1.1', '2012-06-08', 'First working version (including unit tests) released at github.com'], ['0.1.0', '2012-06-02', 'Initial version on Ruby-1.9.3p194 and OrientDB-1.0.0'] ]
- VERSION =
Current version.
- DRIVER_NAME =
Driver identification.
'Orientdb4r Ruby Client'
Class Attribute Summary collapse
-
.logger ⇒ Object
Logger used for logging output.
Class Method Summary collapse
-
.client(options = {}) ⇒ Object
Gets a new database client or an existing for the current thread.
Class Attribute Details
.logger ⇒ Object
Logger used for logging output
51 52 53 |
# File 'lib/orientdb4r.rb', line 51 def logger @logger end |
Class Method Details
.client(options = {}) ⇒ Object
Gets a new database client or an existing for the current thread.
options
* :instance => :new
* :binary => true
* :connection_library => :restclient | :excon
36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/orientdb4r.rb', line 36 def client ={} if :new == [:instance] .delete :instance return .delete(:binary) ? BinClient.new() : RestClient.new() end Thread.exclusive { client = .delete(:binary) ? BinClient.new() : RestClient.new() Thread.current[:orientdb_client] ||= client #Thread.current[:orientdb_client] ||= BinClient.new options } end |