module Fauna

Main namespace for the FaunaDB driver.

Constants

VERSION

The version of the Fauna gem

Public Class Methods

time_from_usecs(microseconds) click to toggle source

Converts microseconds to a Time object.

microseconds

Time in microseconds.

  # File lib/fauna/util.rb
6 def self.time_from_usecs(microseconds)
7   Time.at(microseconds / 1_000_000, microseconds % 1_000_000)
8 end
usecs_from_time(time) click to toggle source

Converts a Time object to microseconds.

time

A Time object.

   # File lib/fauna/util.rb
14 def self.usecs_from_time(time)
15   time.to_i * 1_000_000 + time.usec
16 end