Skip to main content

execute_command

Function execute_command 

Source
pub async fn execute_command(
    system: ActorSystem,
    engine: StandardEngine,
    statements: Vec<String>,
    identity: IdentityId,
    params: Params,
    timeout: Duration,
) -> ExecuteResult<Vec<Frame>>
Expand description

Execute a command with timeout.

Commands are write operations (INSERT, UPDATE, DELETE) that modify the database state. DDL operations are not allowed in command transactions.

§Arguments

  • system - The actor system to execute the command on
  • engine - The database engine to execute the command on
  • statements - The RQL command statements
  • identity - The identity context for permission checking
  • params - Command parameters
  • timeout - Maximum time to wait for command completion

§Returns

  • Ok(Vec<Frame>) - Command results on success
  • Err(ExecuteError::Timeout) - If the command exceeds the timeout
  • Err(ExecuteError::Cancelled) - If the command was cancelled
  • Err(ExecuteError::Engine) - If the engine returns an error