import { Schema } from "apache-arrow"; import { ViewDescription as NativeViewDescription } from "./native"; /** * What a database records about one view. * * A view holds no rows: it stores the statement that defines it and the * schema that statement resolved to, so a reader sees its sources as they * are at read time. */ export interface ViewDescription { /** The view's name within its namespace. */ name: string; /** The namespace holding the view; empty is the root namespace. */ namespacePath: string[]; /** The defining query, as the database stores it. */ query: string; /** The database that unqualified table names in {@link query} resolve against. */ defaultDatabase: string; /** * The namespace path those unqualified names resolve against; empty is the * root namespace. * * Recorded with the view because it outlives the session that declared it: * a reader resolving the query against its own default namespace could read * a different table than the view was defined over. */ defaultNamespacePath: string[]; /** The schema the defining query resolved to when the view was created. */ schema: Schema; } /** Decode the schema the binding hands over as an Arrow IPC file. */ export declare function viewDescriptionFromNative(view: NativeViewDescription): ViewDescription;