Skip to contents

Running and Managing ‘SQL’ Workflows

Functions for executing multi-step SQL workflows with tagged SQL scripts. These tools let you parse SQL into chunks, control execution, and retrieve structured results.

qryflow()
Run a multi-step SQL workflow and return query results
qryflow_run()
Parse and execute a tagged SQL workflow
qryflow_results()
Extract results from a qryflow_workflow object
qryflow_parse()
Parse a SQL workflow into tagged chunks
qryflow_execute()
Execute a parsed qryflow SQL workflow
qryflow_meta()
Extract metadata from qryflow objects

Registration

Functions that allow users to register custom types and inspect the registry. These are useful for extending qryflow.

register_qryflow_type()
Register custom chunk types
qryflow_handler_exists()
Check existence of a given handler in the registry
ls_qryflow_types()
List currently registered chunk types
validate_qryflow_handler()
Ensure correct handler structure

Helpers for Extending qryflow

These functions are exported to help users extend qryflow with custom parsers and handlers.

read_sql_lines()
Standardizes lines read from string, character vector, or file
collapse_sql_lines()
Collapse SQL lines into single character
is_tag_line()
Detect the presence of a properly structured tagline
extract_all_tags() subset_tags()
Extract tagged metadata from a SQL chunk
new_qryflow_chunk()
Create an instance of the qryflow_chunk class

Example Utilities

These functions help to quickly prepare the environment to demonstrate qryflow functionality. Used in the examples, vignettes, and in the testing suite.

example_db_connect()
Create an example in-memory database
example_sql_path()
Get path to qryflow example SQL scripts