Release Notes - FaunaDB 2.7.0

Released 2019-07-16

The FaunaDB team is pleased to announce the availability of FaunaDB 2.7.0.

If you are running your application on FaunaDB Cloud, you are already up and running on this version.

Highlights

This release brings numerous enhancements in security and usability.

Role-based access control (RBAC)

Role-based access control (RBAC) is designed as a replacement for FaunaDB’s current resource-based security model. It’s an alternative to an all-or-nothing security model and is commonly used in applications to restrict access to specific data based on the user’s role. Until 2.7.0, access within FaunaDB was restricted to 4 pre-defined roles. With RBAC, developers can define custom roles that match the applications' requirements and its data model, permitting access only to the data that the user needs to see.

For more information, see the:

Fauna Shell, on the web

Users can now access a web-based version of the Fauna Shell command-line from any browser, anywhere with an internet connection. FQL commands and functions can now be run directly in the browser. This is especially helpful for new users hoping to get started quickly with FaunaDB, without needing to install CLI tools on their local computer.

For more information, see the Cloud Console 2.1.0 release notes.

Renamed "Classes" and "Instances"

One of the biggest user-facing changes in this release is the renaming of "classes" to "collections" and "instances" to "documents". Usability testing has repeatedly surfaced these terms as a source of confusion for new users. As such, we have renamed these terms.

We decided to go with "collection" because it’s more inclusive of flexible data models and resonates well with developers from a NoSQL background. Because databases that use the term "collections" typically also use the word "documents" to denote the objects in those collections, "instances" have been renamed to "documents". We have also found that most new users start with document-based data models to improve productivity during the early prototyping stage of application development.

This rename appears throughout FaunaDB and the documentation, especially in the FQL reference.

Recursive user-defined functions

Recursion has been one of the most commonly-requested features from our community, so we have added the ability to make recursive calls to user-defined functions. Since recursive calls can be very resource-intensive, the number of calls is restricted to a hard limit of 200. An example use case would be a user creating a list of all of her friends' friends within 6 degrees of separation, so she could send them marketing information about her app.

Time to number functions

FaunaDB 2.7.0 introduces new time to number conversion functions. Fauna has two special data types dealing with dates and times. The first data type is date, which stores a calendar date. The second is a timestamp (ts), which stores an instant in time expressed as a calendar date and time of day. These new functions allow developers to extract the year, month, day of month, day of week, day of year, hour, minute, and second values from a timestamp field.

Here is a summary of these new functions. Reference coverage of these functions is available here.

List of issues fixed in 2.7.0

  • Numeric values now sort more predictably; previously, integers and floats could not be compared by value.

  • FaunaDB Enterprise now called FaunaDB Hybrid.

  • Some OS information is now available by running faunadb-admin host-info.

  • Added faunadb-admin config to show configuration of running nodes.

  • Strings can now be passed to Create and Match.

  • Added bash completions for faunadb-admin.

  • Inserts into the future are no longer permitted.

  • Numerous performance improvements.

  • Addressed an issue where duplicated error messages appeared if the index configuration was invalid.

Next Steps

Learn more about FaunaDB from our product page.

Was this article helpful?

We're sorry to hear that.
Tell us how we can improve! documentation@fauna.com

Thank you for your feedback!