Hierarchy

Implements

Constructors

Methods

  • Create a new object in a database at entity[key].

    Parameters

    • entityName: string

      The name of the entity to create the object in.

    • keyName: string

      The name of the key that the object will be stored under.

    • data: object

      The data to store.

    Returns Promise<object>

    True if the data was successfully created, false otherwise.

  • Generate a random string of characters to be used as a unique id

    Returns string | number[]

    • The result of the call to the uuid function
  • Convert an angle in degrees to radians

    Parameters

    • d: number

      the angle in degrees

    Returns number

    the angle in radians

  • Delete a single row or field from a database at entity[key].

    Parameters

    • entityName: string

      The name of the entity to delete the object from.

    • keyName: string

      The name of the key that the object is stored under.

    • fieldName: string

      The name of the key that the object is stored under.

    Returns Promise<boolean>

    True if the data was successfully deleted, false otherwise.

  • Delete an entire group under entity[key].

    Parameters

    • entityName: string

      The name of the entity to delete.

    • keyName: string

      The name of the key that the object is stored under.

    Returns Promise<boolean>

    True if the data was successfully deleted, false otherwise.

  • Calculate the linear distance between two points using the Haversine formula

    Todo

    Limit the coordinates to the min/max ranges

    See

    Point

    Parameters

    Returns number

    The distance in km

  • Read an object from a database at entity[key].

    Parameters

    • entityName: string

      The name of the entity to read the object from.

    • keyName: string

      The name of the key that the object is stored under.

    Returns Promise<any>

    The data stored at entity[key].

  • Search for an object in a database at entity[key] that matches the given criteria.

    Throws

    If the comparison is invalid.

    Parameters

    • entityName: string

      The name of the entity to search the object in.

    • keyName: string

      The name of the key that the object is stored under.

    • needle: string

      The value to search for.

    • comparison: string

      The comparison to use when searching.

    • caseSensitive: boolean

      Whether or not the search should be case sensitive.

    Returns Promise<boolean>

    True if the object was found, false otherwise.

  • Update an object in a database at entity[key].

    Parameters

    • entityName: string

      The name of the entity to update the object in.

    • keyName: string

      The name of the key that the object is stored under.

    • data: any

      The data to store.

    Returns Promise<boolean>

    True if the data was successfully updated, false otherwise.

Generated using TypeDoc