class

TrailDB

Inherits Reference / Object

Load a TrailDB, including metadata and a trails iterator

Constructors

new(path : String)

Load a TrailDB at path (the .tdb extension is optional).

Source

Instance methods

[](uuidish : String | UInt64 | Int32)

Return a iterator for the given UUID.

Source
create_filter(query : TrailDBEventFilterQuery, set_filter : Bool = false)

Create TrailDB filter

Source
db

Raw TrailDB pointer.

Source
event_filter

The current event filter. Set to nil to remove.

Source
event_filter=(event_filter : Nil | TrailDBEventFilter)

The current event filter. Set to nil to remove.

Source
field(fieldish : TrailDBField) : TdbField

Return a field ID for given a field name or field ID.

Source
fields

Field strings.

Source
finalize
Source
get_item(fieldish : String, value : String) : TdbItem

Return the item corresponding to a field ID or a field name and a string value.

Source
get_item_value(item : TdbItem) : String

Return the string value corresponding to an item.

Source
get_trail_id(uuid : String)

Return Trail ID given a UUID.

Source
get_uuid(trail_id : UInt64 | Int32, raw = false) : String

Return UUID given a Trail ID.

Source
get_value(fieldish : TrailDBField, val : TdbVal) : String

Return the string value corresponding to a field ID or a field name and a value ID.

Source
includes?(uuidish)

Return true if UUID or Trail ID exists in this TrailDB.

Source
lexicon(fieldish : TrailDBField)

Return an iterator over values of the given field ID or field name.

Source
lexicon_size(fieldish : TrailDBField) : TdbVal

Return the number of distinct values in the given field ID or field name.

Source
max_timestamp

Return the maximum time stamp of this TrailDB.

Source
min_timestamp

Return the minimum time stamp of this TrailDB.

Source
num_events

Number of events.

Source
num_fields

Number of fields.

Source
num_trails

Number of trails.

Source
parse_timestamp

Whether to parse timestamp as a Time, or leave as UInt64

Source
parse_timestamp=(parse_timestamp : Bool)

Whether to parse timestamp as a Time, or leave as UInt64

Source
reuse_cursor

Whether to reuse the TrailDB cursor. Enabling this prevents out-of-order access of events in trails, but makes iteration more efficient.

Source
reuse_cursor=(reuse_cursor : Bool)

Set whether to reuse the TrailDB cursor

Source
time_range

Return the time range covered by this TrailDB.

Source
trails

Return a iterator for all trails.

Source