Skip to main content
Version: 1.x

Validate command

The validate command validates one or many SurrealQL language files.

BEFORE YOU START : Make sure you’ve installed SurrealDB — it should only take a second!

Command options

ArgumentsDescription
[PATTERNS] REQUIRED

Glob pattern for the files to validate [default: "**/*.surql"]

Example usage

To perform validation on a SurrealQL local file, in a terminal run the surreal validate command with the required argument.

You can perform validation on a single file:

surreal validate user.surql

You can also perform validation on multiple files using a single glob pattern:

# equivalent to "surreal validate"
surreal validate **/*.surql

Finally, you can also perform validation on multiple files using multiple paths/patterns:

surreal validate index.surql schemas/*.surql queries/*.surql

Command help

To see the help information and usage instructions, in a terminal run the surreal validate --help command without any further arguments. This command gives general information on the arguments, inputs, and additional options for the validate command.

surreal validate --help

The output of the above command :

Validate SurrealQL query files

Usage: surreal validate [PATTERNS]...

Arguments:
[PATTERNS]... Glob pattern for the files to validate [default: **/*.surql]

Options:
-h, --help Print help