Skip to content
Search
DSL · Pg query

sql_format

Definition

/**
 * Parse and format SQL query with pretty printing.
 *
 * This is a convenience function that parses SQL and returns it formatted.
 *
 * @param string $sql The SQL query to format
 * @param null|DeparseOptions $options Formatting options (defaults to pretty-print enabled)
 *
 * @throws \RuntimeException if parsing or deparsing fails
 */
sql_format(string $sql, ?DeparseOptions $options) : string

Contributors

Built in the open.

Join us on GitHub
scroll back to top