pub enum Doc {
Json(JsonAdapter),
Csv(CsvAdapter),
Xml(XmlAdapter),
Html(HtmlAdapter),
Sqlite(SqliteAdapter),
Fs(FsAdapter),
FsDeep(ComposeAdapter<FsAdapter>),
Git(GitAdapter),
Archive(ComposeAdapter<ArchiveAdapter>),
Xlsx(XlsxAdapter),
Code(CodeAdapter),
Mount(MountAdapter),
}Expand description
A materialized source: one variant per adapter family. JSON-model formats (json/yaml/toml) render node results as pointers, the rest as locators.
Variants§
Json(JsonAdapter)
Csv(CsvAdapter)
Xml(XmlAdapter)
Html(HtmlAdapter)
Sqlite(SqliteAdapter)
Fs(FsAdapter)
FsDeep(ComposeAdapter<FsAdapter>)
Git(GitAdapter)
Archive(ComposeAdapter<ArchiveAdapter>)
Xlsx(XlsxAdapter)
Code(CodeAdapter)
Mount(MountAdapter)
Implementations§
Source§impl Doc
impl Doc
Sourcepub fn parse(input: &str, format: &str) -> Result<Doc>
pub fn parse(input: &str, format: &str) -> Result<Doc>
Parse a text document by format name — the wasm entry point,
and the text tail of the native open. Formats: json, yaml,
toml, csv, tsv, xml, html, markdown, jsonl/ndjson.
Sourcepub fn run(
&self,
query: &str,
now: (i64, u32),
allow_shell: bool,
) -> Result<QueryResult>
pub fn run( &self, query: &str, now: (i64, u32), allow_shell: bool, ) -> Result<QueryResult>
Run one query against this source with the session’s invocation
instant and shell permission. The query text carries any macro
definitions inline (the session prepends its table), which
quarb::run expands.
Source§impl Doc
impl Doc
Sourcepub fn open(path: &Path, opts: &Options) -> Result<Doc>
pub fn open(path: &Path, opts: &Options) -> Result<Doc>
Open one path as a local source. Directories are filesystem
trees (--descend grafts parseable leaves); git:PATH opens a
repository; binary kinds (SQLite, spreadsheets, archives) and
source files dispatch by extension/magic; everything else is a
text document parsed by extension or content sniff.