Skip to main content

StatementBuilder

Trait StatementBuilder 

Source
pub trait StatementBuilder {
    // Required methods
    fn build(&self, db_backend: &DbBackend) -> Statement;
    fn audit(&self) -> Result<QueryAccessAudit, AuditError>;
}
Expand description

Anything that can be rendered to a backend-specific Statement.

Implemented by the sea_query statement types (SelectStatement, InsertStatement, etc.) so they can be passed to ConnectionTrait::execute / query_all directly.

Required Methodsยง

Source

fn build(&self, db_backend: &DbBackend) -> Statement

Render self into a Statement for db_backend.

Source

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.

Inspect the statement and produce the access request that RbacEngine needs to authorise it.

Dyn Compatibilityยง

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Typesยง

Sourceยง

impl StatementBuilder for DeleteStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for ForeignKeyCreateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for ForeignKeyDropStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for IndexCreateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for IndexDropStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for InsertStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for SelectStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TableAlterStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TableCreateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TableDropStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TableRenameStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TableTruncateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TypeAlterStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TypeCreateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for TypeDropStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for UpdateStatement

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.
Sourceยง

impl StatementBuilder for WithQuery

Sourceยง

fn build(&self, db_backend: &DbBackend) -> Statement

Sourceยง

fn audit(&self) -> Result<QueryAccessAudit, AuditError>

Available on crate feature rbac only.

Implementorsยง