execute

Function execute 

Source
pub fn execute(sql: &str, params: &[&dyn ToDbValue]) -> VtxResult<u64>
Expand description

Executes non-query SQL statements (INSERT / UPDATE / DELETE).

§Parameters

  • sql: Raw SQL string, supports ? placeholders.
  • params: Array of parameters, elements must implement ToDbValue.

§Returns

  • Success: Returns the number of affected rows.
  • Failure: Maps to VtxError::DatabaseError.

§Note

Calling this interface is prohibited under the Restricted security policy.