Expand description
Exec module - Execute QAIL AST for seeding/admin tasks
Type-safe execution using native QAIL AST - no raw SQL.
§Syntax
add <table> fields <col1>, <col2> values <val1>, <val2>§Multi-line Content
Use triple quotes (''' or """) for multi-line values:
add articles fields title, content values 'My Title', '''
<article>
<p>Multi-line HTML content here.</p>
<p>Newlines are preserved inside triple quotes.</p>
</article>
'''§File Format (.qail)
- Each line is a separate statement (unless inside triple quotes)
- Comments start with
#or-- - Blank lines are ignored
§Examples
# Inline query
qail exec "add users fields name, email values 'Alice', 'a@test.com'" --url postgres://...
# From file with SSH tunnel
qail exec -f seed.qail --ssh myserver --url postgres://...
# Dry-run (preview SQL only)
qail exec -f data.qail --dry-run
# Wrap in transaction
qail exec -f batch.qail --url postgres://... --txStructs§
- Exec
Config - Configuration for exec command
Functions§
- run_
exec - Run the exec command (type-safe QAIL AST only)