Skip to main content

RunSqlStep <ResourceType>

Run one or more SQL queries.

This step will treat each non-empty line in the input SQL as a query and try to execute it using $wpdb. Queries spanning multiple lines are not yet supported.

@hasRunnableExample
@example
<code>
{
"step": "runSql",
"sql": {
"resource": "literal",
"name": "schema.sql",
"contents": "DELETE FROM wp_posts"
}
}
</code>

Index

Properties

Properties

sql

sql: ResourceType

The SQL to run. Each non-empty line must contain a valid SQL query.

step

step: runSql

The step identifier.