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, line 6
def self.time_from_usecs(microseconds)
  Time.at(microseconds / 1_000_000, microseconds % 1_000_000)
end
usecs_from_time(time) click to toggle source

Converts a Time object to microseconds.

time

A Time object.

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