pub struct MySQLSqlGenerator;Expand description
MySQL SQL generator implementation
Implementations§
Source§impl MySQLSqlGenerator
impl MySQLSqlGenerator
Sourcepub fn create_policy_sql(&self, _policy: &Policy) -> String
pub fn create_policy_sql(&self, _policy: &Policy) -> String
Create RLS policy SQL (MySQL doesn’t support RLS natively) This would need to be implemented using application-level security
Sourcepub fn enable_rls_sql(&self, table_name: &str, _schema: Option<&str>) -> String
pub fn enable_rls_sql(&self, table_name: &str, _schema: Option<&str>) -> String
Create RLS enable SQL for a table (MySQL doesn’t support RLS natively)
Sourcepub fn disable_rls_sql(&self, table_name: &str, _schema: Option<&str>) -> String
pub fn disable_rls_sql(&self, table_name: &str, _schema: Option<&str>) -> String
Create RLS disable SQL for a table (MySQL doesn’t support RLS natively)
Sourcepub fn drop_policy_sql(&self, _policy: &Policy) -> String
pub fn drop_policy_sql(&self, _policy: &Policy) -> String
Drop policy SQL (MySQL doesn’t support RLS natively)
Sourcepub fn create_extension_sql(&self, extension: &Extension) -> String
pub fn create_extension_sql(&self, extension: &Extension) -> String
Create extension SQL (MySQL doesn’t support extensions natively)
Sourcepub fn drop_extension_sql(&self, extension: &Extension) -> String
pub fn drop_extension_sql(&self, extension: &Extension) -> String
Drop extension SQL (MySQL doesn’t support extensions natively)
Sourcepub fn extension_exists_sql(&self, extension_name: &str) -> String
pub fn extension_exists_sql(&self, extension_name: &str) -> String
Check if extension exists SQL (MySQL doesn’t support extensions natively)
Sourcepub fn list_extensions_sql(&self) -> String
pub fn list_extensions_sql(&self) -> String
List installed extensions SQL (MySQL doesn’t support extensions natively)
Sourcepub fn create_guc_sql(&self, guc: &GucSetting) -> String
pub fn create_guc_sql(&self, guc: &GucSetting) -> String
Create GUC setting SQL (MySQL doesn’t support GUC natively)
Sourcepub fn reset_guc_sql(&self, guc: &GucSetting) -> String
pub fn reset_guc_sql(&self, guc: &GucSetting) -> String
Reset GUC setting SQL (MySQL doesn’t support GUC natively)
Sourcepub fn get_guc_sql(&self, guc: &GucSetting) -> String
pub fn get_guc_sql(&self, guc: &GucSetting) -> String
Get GUC setting value SQL (MySQL doesn’t support GUC natively)
Sourcepub fn list_guc_settings_sql(&self) -> String
pub fn list_guc_settings_sql(&self) -> String
List all GUC settings SQL (MySQL doesn’t support GUC natively)
Sourcepub fn set_jwt_context_sql(
&self,
user_id: &str,
tenant_id: Option<&str>,
role: Option<&str>,
) -> String
pub fn set_jwt_context_sql( &self, user_id: &str, tenant_id: Option<&str>, role: Option<&str>, ) -> String
Set JWT context SQL (MySQL doesn’t support GUC natively)
Sourcepub fn clear_jwt_context_sql(&self) -> String
pub fn clear_jwt_context_sql(&self) -> String
Clear JWT context SQL (MySQL doesn’t support GUC natively)
Trait Implementations§
Source§impl SqlGenerator for MySQLSqlGenerator
impl SqlGenerator for MySQLSqlGenerator
Source§fn create_table_sql(&self, table: &Table) -> String
fn create_table_sql(&self, table: &Table) -> String
Source§fn create_view_sql(&self, view: &View) -> String
fn create_view_sql(&self, view: &View) -> String
Source§fn create_index_sql(&self, index: &Index) -> String
fn create_index_sql(&self, index: &Index) -> String
Source§fn create_type_sql(&self, _composite_type: &CompositeType) -> String
fn create_type_sql(&self, _composite_type: &CompositeType) -> String
Source§fn create_schema_sql(&self, schema_name: &str) -> String
fn create_schema_sql(&self, schema_name: &str) -> String
Source§fn alter_table_sql(&self, table: &Table, changes: &[String]) -> String
fn alter_table_sql(&self, table: &Table, changes: &[String]) -> String
Source§fn drop_table_sql(&self, table_name: &str) -> String
fn drop_table_sql(&self, table_name: &str) -> String
Source§fn drop_view_sql(&self, view_name: &str) -> String
fn drop_view_sql(&self, view_name: &str) -> String
Source§fn drop_index_sql(&self, index_name: &str) -> String
fn drop_index_sql(&self, index_name: &str) -> String
Source§fn insert_sql(
&self,
table_name: &str,
columns: &[String],
values: &[String],
) -> String
fn insert_sql( &self, table_name: &str, columns: &[String], values: &[String], ) -> String
Source§fn update_sql(
&self,
table_name: &str,
set_clause: &str,
where_clause: &str,
) -> String
fn update_sql( &self, table_name: &str, set_clause: &str, where_clause: &str, ) -> String
Source§fn select_sql(
&self,
table_name: &str,
columns: &[String],
where_clause: Option<&str>,
) -> String
fn select_sql( &self, table_name: &str, columns: &[String], where_clause: Option<&str>, ) -> String
Source§fn quote_identifier(&self, identifier: &str) -> String
fn quote_identifier(&self, identifier: &str) -> String
Source§fn quote_string(&self, value: &str) -> String
fn quote_string(&self, value: &str) -> String
Source§fn current_timestamp_function(&self) -> &str
fn current_timestamp_function(&self) -> &str
Source§fn auto_increment_keyword(&self) -> &str
fn auto_increment_keyword(&self) -> &str
Source§fn create_guc_sql(&self, guc: &GucSetting) -> String
fn create_guc_sql(&self, guc: &GucSetting) -> String
Source§fn reset_guc_sql(&self, guc: &GucSetting) -> String
fn reset_guc_sql(&self, guc: &GucSetting) -> String
Source§fn get_guc_sql(&self, guc: &GucSetting) -> String
fn get_guc_sql(&self, guc: &GucSetting) -> String
Source§fn list_guc_settings_sql(&self) -> String
fn list_guc_settings_sql(&self) -> String
Source§fn set_jwt_context_sql(
&self,
user_id: &str,
tenant_id: Option<&str>,
role: Option<&str>,
) -> String
fn set_jwt_context_sql( &self, user_id: &str, tenant_id: Option<&str>, role: Option<&str>, ) -> String
Source§fn clear_jwt_context_sql(&self) -> String
fn clear_jwt_context_sql(&self) -> String
Auto Trait Implementations§
impl Freeze for MySQLSqlGenerator
impl RefUnwindSafe for MySQLSqlGenerator
impl Send for MySQLSqlGenerator
impl Sync for MySQLSqlGenerator
impl Unpin for MySQLSqlGenerator
impl UnsafeUnpin for MySQLSqlGenerator
impl UnwindSafe for MySQLSqlGenerator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more