Trait rustdb::Transaction[][src]

pub trait Transaction: Any {
    fn selected(&mut self, values: &[Value]);
fn set_error(&mut self, err: String); fn status_code(&mut self, _code: i64) { ... }
fn header(&mut self, _name: &str, _value: &str) { ... }
fn global(&self, _kind: i64) -> i64 { ... }
fn arg(&mut self, _kind: i64, _name: &str) -> Rc<String> { ... }
fn file_attr(&mut self, _fnum: i64, _atx: i64) -> Rc<String> { ... }
fn file_content(&mut self, _fnum: i64) -> Arc<Vec<u8>> { ... }
fn get_error(&mut self) -> String { ... }
fn set_extension(&mut self, _ext: Box<dyn Any + Send + Sync>) { ... }
fn get_extension(&mut self) -> Box<dyn Any + Send + Sync> { ... } }
Expand description

Input/Output message. Query and Response.

Required methods

Append SELECT values to response body.

Set the error string.

Provided methods

STATUSCODE builtin function. sets the response status code.

HEADER builtin function, adds header to response.

GLOBAL builtin function. Used to get request time.

ARG builtin function. Get path, query parameter, form value or cookie.

Get file attribute ( One of name, content_type, file_name )

Get file content.

Get the error string.

Set the extension.

Get the extension. Note: this takes ownership, so extension needs to be set afterwards.

Implementors