A simple library for Firebase real-time database

Related tags

Database Firerust
Overview

Firerust

A very simple library to implement the Firebase real-time database in your code with the best performance

Instalation

Add this to your Cargo.toml:

[dependencies]
firerust = { version = "1" }

Usage

Import firerust

use firerust::FirebaseClient;

Initialize a Firebase client without auth

.firebaseio.com/")?;">
FirebaseClient::new("https:///.firebaseio.com/")?;

Initialize a Firebase client with auth

.firebaseio.com/")?; client.auth("");">
let mut client = FirebaseClient::new("https:///.firebaseio.com/")?;
client.auth("");

Examples

A basic example of data fetch:

());">
use firerust::FirebaseClient;
use serde_json::Value;


let client = FirebaseClient::new("https://docs-examples.firebaseio.com/")?;
let reference = client.reference("/");

println!("{:?}", reference.get::());

A basic example of data set:

use firerust::FirebaseClient;


let client = FirebaseClient::new("https://docs-examples.firebaseio.com/")?;
let reference = client.reference("/");

reference.set(serde_json::json!({
    "message": "Setting data"
}))?;

A basic example of data update:

use firerust::FirebaseClient;


let client = FirebaseClient::new("https://docs-examples.firebaseio.com/")?;
let reference = client.reference("/");

reference.update(serde_json::json!({
    "message": "Updating data"
}))?;

A basic example of data deletion:

use firerust::FirebaseClient;


let client = FirebaseClient::new("https://docs-examples.firebaseio.com/")?;
let reference = client.reference("/");

reference.delete()?;

A snapshot event example:

use firerust::FirebaseClient;
use serde_json::Value;


let client = FirebaseClient::new("https://docs-examples.firebaseio.com/")?;
let reference = client.reference("/");

reference.on_snapshot(| data: Value | {
    println!("{:?}", data);

    Ok(())
})?;
You might also like...
A dotfiles manager, with real time fle watching and 100% less sym-links!

Kubo A dotfile manager that watches files in real time. Usage Create a directory called .kubo in $HOME, then create a file called kubo.toml in .kubo.

An implementation of the tz database for the time-rs Rust crate.

time-tz An implementation of the tz database for the time-rs Rust crate. This implementation is based off of chrono-tz

tzdb — Time Zone Database

tzdb — Time Zone Database Static time zone information for tz-rs. This crate provides all time zones found in the Time Zone Database, currently in the

A high-performance, distributed, schema-less, cloud native time-series database
A high-performance, distributed, schema-less, cloud native time-series database

CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

A simple key value database for storing simple structures.

Perdia-DB A simple key value database for storing simple structures. No nesting of structures is supported, but may be implemented in the future. Toke

PackDb is a simple messagepack based database in rust

PackDb is a simple key value messagepack store Inspired by kwik It uses your local storage

webmention-receiver - a simple program that receives webmentions, records them to a SQLite database

webmention-receiver is a simple program that receives webmentions, records them to a SQLite database, and allows viewing them via a webpage or RSS feed. It has no conception of an "account", and by default will accept webmentions for any domain. It is possible to configure it to only accept webmentions for a specific set of domains, if you'd prefer.

A fast and simple in-memory database with a key-value data model written in Rust

Segment Segment is a simple & fast in-memory database with a key-value data model written in Rust. Features Dynamic keyspaces Keyspace level control o

GlueSQL is a SQL database library written in Rust

GlueSQL is a SQL database library written in Rust. It provides a parser (sqlparser-rs), execution layer, and optional storage (sled) packaged into a single library.

Releases(1.0.0)
Owner
Daniel Dimbarre
Daniel Dimbarre
Skybase is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and SSL

Skybase The next-generation NoSQL database What is Skybase? Skybase (or SkybaseDB/SDB) is an effort to provide the best of key/value stores, document

Skybase 1.4k Dec 29, 2022
Skytable is an extremely fast, secure and reliable real-time NoSQL database with automated snapshots and TLS

Skytable is an effort to provide the best of key/value stores, document stores and columnar databases, that is, simplicity, flexibility and queryability at scale. The name 'Skytable' exemplifies our vision to create a database that has limitless possibilities. Skytable was previously known as TerrabaseDB (and then Skybase) and is also nicknamed "STable", "Sky" and "SDB" by the community.

Skytable 1.4k Dec 29, 2022
The spatial message broker and database for real-time multiplayer experiences. Official Rust implementation.

WorldQL Server Rust implementation of WorldQL, the spatial message broker and database for real-time multiplayer experiences Setup Instructions ⚠️ Thi

null 214 Jan 2, 2023
A Distributed SQL Database - Building the Database in the Public to Learn Database Internals

Table of Contents Overview Usage TODO MVCC in entangleDB SQL Query Execution in entangleDB entangleDB Raft Consensus Engine What I am trying to build

Sarthak Dalabehera 38 Jan 2, 2024
Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis

OnTimeDB Scalable and fast data store optimised for time series data such as financial data, events, metrics for real time analysis OnTimeDB is a time

Stuart 2 Apr 5, 2022
The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

The rust client for CeresDB. CeresDB is a high-performance, distributed, schema-less, cloud native time-series database that can handle both time-series and analytics workloads.

null 12 Nov 18, 2022
Seed your development database with real data ⚡️

Seed Your Development Database With Real Data ⚡️ Replibyte is a blazingly fast tool to seed your databases with your production data while keeping sen

Qovery 3.4k Jan 2, 2023
Materialize simplifies application development with streaming data. Incrementally-updated materialized views - in PostgreSQL and in real time. Materialize is powered by Timely Dataflow.

Materialize is a streaming database for real-time applications. Get started Check out our getting started guide. About Materialize lets you ask questi

Materialize, Inc. 4.7k Jan 8, 2023
A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

A Modern Real-Time Data Processing & Analytics DBMS with Cloud-Native Architecture, built to make the Data Cloud easy

Datafuse Labs 5k Jan 9, 2023
LIMITS is yet another fully open source, interoperable, decentralised real-time communication protocol!

LIMITS: Limit-IM does not have ITS LIMITS We are undergoing a major refactoring and technology stack adjustment to better accommodate clustered deploy

Limit LAB 14 Feb 4, 2023