Expand description
Ursa SQL: DataFusion’s dialect plus Ursa’s own statements.
parse_sql splits a string into UrsaStatements. execute runs one
on an engine session (see ursa_engine::new_session). Statements DataFusion
knows are planned and run by DataFusion, except that one may not drop a
table a graph uses, or replace it by one the graph no longer fits
(ursa_engine::graph::check_ddl). CREATE PROPERTY GRAPH and DROP PROPERTY GRAPH define graphs (see property_graph for the subset of
SQL/PGQ supported); SHOW GRAPHS and DESCRIBE GRAPH describe them.
SHOW ursa.<setting> shows one of Ursa’s settings, and SHOW ALL lists
them with DataFusion’s (see settings). SHOW TABLES lists the tables
and views, without information_schema’s own views. read_parquet(...),
read_csv(...) and read_json(...) open their files before a statement
is planned (see ursa_engine::read_functions).
A session may have a .ursa database (database): open_session
opens one, and ATTACH 'club.ursa' opens one in an in-memory session that
has defined nothing yet. In such a session, statements that define or drop
views, external tables and graphs are kept in the database’s catalog file.
Relative file paths resolve against the current directory when a statement
runs, as in DuckDB; a stored definition’s paths are rewritten relative to
the directory holding the file (see database).
Re-exports§
pub use database::open_session;
Modules§
- database
- Statements in a session with a
.ursadatabase. - graph_
table - SQL/PGQ’s
GRAPH_TABLE ( … ), rewritten before sqlparser sees it (#296). - property_
graph - The table clauses of
CREATE PROPERTY GRAPH: SQL/PGQ’s element tables (#295).
Structs§
- Attach
- Create
Property Graph CREATE PROPERTY GRAPH: Ursa’s subset of SQL/PGQ (seecrate::property_graph).- Describe
Graph - Drop
Property Graph - Open
Options - How to open a database.
- Ursa
Parser - Ursa’s parser: DataFusion’s, with Ursa’s statements recognised first.
Enums§
- Ursa
Statement - One statement of Ursa SQL.
Constants§
- DEFAULT_
RECURSION_ LIMIT - Same as sqlparser’s and DataFusion’s default.
Functions§
- execute
- Run one statement on
ctx. The returned frame is lazy for a query, and already applied for DDL (as withSessionContext::sql). - execute_
with_ text execute, with the statement’s text as written (fromparse_sql_with_text_for), which a database stores when the statement’sDisplaydoes not round-trip.- parse_
sql - Parse
sql(one or more statements separated by;) with the generic dialect. - parse_
sql_ for - Parse
sqlwith the session’s configured dialect and recursion limit. - parse_
sql_ with_ text_ for parse_sql_for, with each statement’s text as written (seeexecute_with_text).