pub struct FirebaseAdapter { /* private fields */ }Expand description
A Firebase Realtime Database (subtree), exposed as an arbor.
Implementations§
Source§impl FirebaseAdapter
impl FirebaseAdapter
Sourcepub fn connect(target: &str) -> Result<Self, FirebaseError>
pub fn connect(target: &str) -> Result<Self, FirebaseError>
Connect to firebase://HOST/BASE/PATH[?QUERY]. Verifies
the target answers (one shallow GET of the root).
Sourcepub fn connect_with_refs(
target: &str,
refs: Refs,
) -> Result<Self, FirebaseError>
pub fn connect_with_refs( target: &str, refs: Refs, ) -> Result<Self, FirebaseError>
[connect], with a declared reference schema (see the
module doc): bare ~> and -> crosslinks work for the
declared fields.
Trait Implementations§
Source§impl AstAdapter for FirebaseAdapter
impl AstAdapter for FirebaseAdapter
Source§fn children_named(&self, node: NodeId, name: &str) -> Vec<NodeId>
fn children_named(&self, node: NodeId, name: &str) -> Vec<NodeId>
Name-addressed navigation — the path through opaque containers (one direct GET; no enumeration). Enumerated containers answer from their key set without a request.
Source§fn traits(&self, node: NodeId) -> Vec<String>
fn traits(&self, node: NodeId) -> Vec<String>
The JSON kind, once known: <object> / <string> /
<number> / <boolean>.
Source§fn property(&self, node: NodeId, name: &str) -> Option<Value>
fn property(&self, node: NodeId, name: &str) -> Option<Value>
::field — one direct GET of path/field.json.
Source§fn default_value(&self, node: NodeId) -> Option<Value>
fn default_value(&self, node: NodeId) -> Option<Value>
A scalar projects to its value; a container has no default projection.
Source§fn metadata(&self, node: NodeId, key: &str) -> Option<Value>
fn metadata(&self, node: NodeId, key: &str) -> Option<Value>
;;;type, ;;;length (children of a container), and
;;;path (the RTDB path — the node’s address in the
database).
Source§fn resolve(
&self,
node: NodeId,
property: &str,
hint: Option<&str>,
) -> Option<NodeId>
fn resolve( &self, node: NodeId, property: &str, hint: Option<&str>, ) -> Option<NodeId>
Hint-based only (RTDB has no schema): ::parent~>item
reads the parent field and lands on <base>/item/<value>
— the hint names a root-relative container, like the
relational adapters’ target table.
Source§fn links(&self, node: NodeId) -> Vec<(String, NodeId)>
fn links(&self, node: NodeId) -> Vec<(String, NodeId)>
Every declared field with a value is an outgoing crosslink,
labeled by the field name; a field/* declaration yields
one edge per array element. Each edge is probed (one GET)
so dangling references stay out.
Source§fn children(&self, node: NodeId) -> Vec<NodeId>
fn children(&self, node: NodeId) -> Vec<NodeId>
node, in document order. Read moreSource§fn name(&self, node: NodeId) -> Option<String>
fn name(&self, node: NodeId) -> Option<String>
node — the label of its incoming tree edge. Read moreSource§fn backlinks(&self, _node: NodeId) -> Vec<(String, NodeId)>
fn backlinks(&self, _node: NodeId) -> Vec<(String, NodeId)>
node, as (label, source) pairs, for
<- navigation. May be expensive (an adapter that does not
precompute edges must search for referrers).Source§fn link_property(
&self,
_source: NodeId,
_label: &str,
_target: NodeId,
_name: &str,
) -> Option<Value>
fn link_property( &self, _source: NodeId, _label: &str, _target: NodeId, _name: &str, ) -> Option<Value>
source --label--> target — the
$-::prop read. Adapters whose edges carry data (a property
graph’s relationship properties) override this; None if the
edge is bare or unknown. Where parallel edges share source,
label, and target, the adapter answers for one of them,
consistently.Source§fn quantifier_bound(&self) -> usize
fn quantifier_bound(&self) -> usize
+, *, {m,}) expand, and the ceiling of any
explicit {m,n} (the effective upper bound is min(n, N_max)).
An adapter whose natural structures run deep may raise it; the
CLI overrides it per run (qua --quantifier-bound).Source§fn allow_shell(&self) -> bool
fn allow_shell(&self) -> bool
sh(...) pipeline stage may run external
commands. False by default — query text stays inert data —
and enabled per run by the CLI (qua --allow-shell) through
the AllowShell wrapper.Source§fn invocation_instant(&self) -> Option<(i64, u32)>
fn invocation_instant(&self) -> Option<(i64, u32)>
now() denotes (spec: The Temporal
Fragment, Determinism): one UTC timeline point bound by the
runner BEFORE evaluation begins — evaluation itself never
reads a clock. None by default (a library run is fully
deterministic; now() reads as null); the CLI binds it at
startup — pinnable with qua --now — through the
WithNow wrapper.Source§fn unit_scale(&self, expr: &str) -> Option<(f64, String)>
fn unit_scale(&self, expr: &str) -> Option<(f64, String)>
[::range < '50kellicam'] resolves through the
document’s .!units imports.