0.3.0
Released on Dec 14, 2021
Features:
Enable query and session parameters to be defined on a JSON-RPC connection
Ensure subqueries can access encoding parent query and grand-parent queries
Add diff-match-patch functionality when updating document records
Separate authentication levels for Namespace and Database specific access
Authentication scope definition and setup, with user-defined authentication logic for each scope
Pre-defined aggregate analytics views
Aggregate views let you pre-compute analytics queries as data is written to SurrealDB. Similarly to an index, a table view lets you select, aggregate, group, and order data, with support for moving averages, time-based windowing, and attribute-based counting. Pre-defined aggregate views are efficient and performant, with only a single record modification being made for every write.
-- Drop all writes to the reading table. We don't need every reading.
DEFINE TABLE reading DROP;
-- Define a table as a view which aggregates data from the reading table
DEFINE TABLE temperatures_by_month AS
SELECT
count() AS total,
time::month(recorded_at) AS month,
math::mean(temperature) AS average_temp
FROM reading
GROUP BY city
;
-- Add a new temperature reading with some basic attributes
CREATE reading SET
temperature = 27.4,
recorded_at = time::now(),
city = 'London',
location = (-0.118092, 51.509865)
;Upgrade or install
Get SurrealDB v0.3.0
Pick how you want to install or upgrade. Surrealist can update connected instances in place, or choose a platform below to copy a CLI command for v0.3.0.
You can upgrade your SurrealDB Cloud instance to v0.3.0 effortlessly through the Surrealist app.
- Open the Surrealist app
- Select your organisation and instance
- On the dashboard, click on the "Upgrade" button
- Your instance will be updated and restarted automatically
Our newsletter
Get tutorials, AI agent recipes, webinars, and early product updates in your inbox every two weeks