inline

Executes a database action or SQL statement.

Target function

Signature

1inline(...) => { ... }

Executes a database action or SQL statement.

inline is a global callable that can be used wherever an expression is valid. inline is part of datasource access. Prefer bind values for visitor input, inspect errors during writes, and keep display escaping separate from SQL handling.

Parameters

inline-code">...
Additional values may be supplied after the earlier arguments.

Examples

Basic call

1inline(-database='contacts', -sql='SELECT 1 AS ok') => { field('ok') }
The example shows the call shape; use bind values and checked errors for visitor-supplied data.

Prepared SQL inline with records

1[2local(email) = web_request->param('email')3inline(4    -database='contacts',5    -sql='SELECT id, name FROM people WHERE email=?',6    -bindvalues=array(#email)7) => {8    records => {9        '<p>' + field('name')->encodeHtml + '</p>'10    }11}12]
Use bind values for visitor input where the datasource supports prepared execution.