Skip to main content

FirebaseAdapter

Struct FirebaseAdapter 

Source
pub struct FirebaseAdapter { /* private fields */ }
Expand description

A Firebase Realtime Database (subtree), exposed as an arbor.

Implementations§

Source§

impl FirebaseAdapter

Source

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).

Source

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.

Source

pub fn locator(&self, node: NodeId) -> String

A human-readable locator: the RTDB path.

Trait Implementations§

Source§

impl AstAdapter for FirebaseAdapter

Source§

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>

The JSON kind, once known: <object> / <string> / <number> / <boolean>.

Source§

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>

A scalar projects to its value; a container has no default projection.

Source§

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>

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.

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 root(&self) -> NodeId

The root node — the initial navigation context.
Source§

fn children(&self, node: NodeId) -> Vec<NodeId>

The tree children of node, in document order. Read more
Source§

fn name(&self, node: NodeId) -> Option<String>

The name of node — the label of its incoming tree edge. Read more
Source§

fn parent(&self, node: NodeId) -> Option<NodeId>

The parent of node, or None for the root.
Incoming crosslinks to node, as (label, source) pairs, for <- navigation. May be expensive (an adapter that does not precompute edges must search for referrers).
A property of the crosslink 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

The quantifier bound N_max: the depth to which open-ended path quantifiers (+, *, {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

Whether the 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)>

The invocation instant 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)>

The scale of a unit expression — (factor, canonical SI-base expansion) — for the unital reading’s criterion text (spec: The Quantital Fragment). The default answers from the engine’s frozen built-in table; a unit-aware adapter (kaiv) overrides it to include the mounted document’s own custom units, so [::range < '50kellicam'] resolves through the document’s .!units imports.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.