Module: Fauna
- Defined in:
- lib/fauna.rb,
lib/fauna/json.rb,
lib/fauna/page.rb,
lib/fauna/util.rb,
lib/fauna/query.rb,
lib/fauna/client.rb,
lib/fauna/errors.rb,
lib/fauna/context.rb,
lib/fauna/objects.rb,
lib/fauna/version.rb,
lib/fauna/client_logger.rb,
lib/fauna/request_result.rb
Overview
Main namespace for the FaunaDB client.
Defined Under Namespace
Modules: ClientLogger, ErrorHelpers, FaunaJson, Query Classes: BadRequest, Client, Context, DSLContext, ErrorData, Failure, FaunaDecode, FaunaError, InternalError, MethodNotAllowed, NoContextError, NotFound, Page, PermissionDenied, Ref, RequestResult, SetRef, Unauthorized, UnavailableError, UnexpectedError
Constant Summary collapse
- VERSION =
The version of the Fauna gem
'2.1.2'.freeze
Class Method Summary collapse
-
.time_from_usecs(microseconds) ⇒ Object
Converts microseconds to a Time object.
-
.usecs_from_time(time) ⇒ Object
Converts a Time object to microseconds.
Class Method Details
.time_from_usecs(microseconds) ⇒ Object
Converts microseconds to a Time object.
microseconds
-
Time in microseconds.
6 7 8 |
# File 'lib/fauna/util.rb', line 6 def self.time_from_usecs(microseconds) Time.at(microseconds / 1_000_000, microseconds % 1_000_000) end |
.usecs_from_time(time) ⇒ Object
Converts a Time object to microseconds.
time
-
A Time object.
14 15 16 |
# File 'lib/fauna/util.rb', line 14 def self.usecs_from_time(time) time.to_i * 1_000_000 + time.usec end |