logical.QueryOptionstypeno test imports ittype QueryOptions = { readonly limit?: number; readonly params?: readonly Value[] };What may be given to a question.
Questions of the journal in SQL (commons evidence-capture 0006-evidence-capture-query): the entries of the journal and the last look at each asset, made into relations, and a read-only SQL answered over them with the SQL language library (its guard judges that the text is one read and binds it to the catalog, its engine answers). Pure: it is given the entries it reads, so that the assets that changed most, the assets not looked at for a day and the failures of a kind are one line of SQL each.
import { queryJournal } from "@intellectual-frontiers/evidence-capture/logical";
// queryJournal(entries, "SELECT asset, changes FROM assets ORDER BY changes DESC LIMIT 5");logical.QueryOptionstypeno test imports ittype QueryOptions = { readonly limit?: number; readonly params?: readonly Value[] };What may be given to a question.
logical.Answertypeno test imports ittype Answer = { readonly columns: readonly string[]; readonly rows: readonly (readonly Value[])[]; readonly truncated: boolean };What a question gives.
logical.journalCatalogfunctionno test imports itfunction journalCatalog(): CatalogThe catalog of the relations.
logical.journalRelationsfunctionno test imports itfunction journalRelations(entries: readonly (Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {})[]): Readonly<Record<string, Table>>The relations of the entries: journal is each entry (its subject is the asset), assets the entries of each asset counted, its last look and its first.
logical.queryJournalfunctionno test imports itfunction queryJournal(entries: readonly (Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {})[], sql: string, options?: QueryOptions): Result<Answer, string>The answer to one read-only question over the journal, or why it is refused (with its place) or cannot be answered.
QueryOptionstypeno test imports ittype QueryOptions = { readonly limit?: number; readonly params?: readonly Value[] };What may be given to a question.
Answertypeno test imports ittype Answer = { readonly columns: readonly string[]; readonly rows: readonly (readonly Value[])[]; readonly truncated: boolean };What a question gives.
journalCatalogfunctionno test imports itfunction journalCatalog(): CatalogThe catalog of the relations.
journalRelationsfunctionno test imports itfunction journalRelations(entries: readonly (Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {})[]): Readonly<Record<string, Table>>The relations of the entries: journal is each entry (its subject is the asset), assets the entries of each asset counted, its last look and its first.
queryJournalfunctionno test imports itfunction queryJournal(entries: readonly (Document & { readonly seq: number; readonly previous: string; readonly type: string; readonly subject: string; readonly evidence: string; readonly digest: string; } & {})[], sql: string, options?: QueryOptions): Result<Answer, string>The answer to one read-only question over the journal, or why it is refused (with its place) or cannot be answered.