MCPcopy Create free account
hub / github.com/belchior/sql_query_builder / raw

Method raw

src/alter_table/alter_table.rs:226–229  ·  view source on GitHub ↗

Adds at the beginning a raw SQL query. Is useful to create a more complex alter table signature. ### Example ``` # use sql_query_builder as sql; let create_table_query = sql::AlterTable::new() .raw("ALTER TABLE IF EXISTS users") .drop("legacy_column") .as_string(); # let expected = "ALTER TABLE IF EXISTS users DROP legacy_column"; # assert_eq!(expected, create_table_query); ``` Output ```sql

(mut self, raw_sql: &str)

Source from the content-addressed store, hash-verified

224 /// ALTER TABLE IF EXISTS users DROP legacy_column
225 /// ```
226 pub fn raw(mut self, raw_sql: &str) -> Self {
227 push_unique(&mut self._raw, raw_sql.trim().to_string());
228 self
229 }
230
231 /// Adds a raw SQL query after a specified parameter.
232 ///

Callers

nothing calls this directly

Calls 1

push_uniqueFunction · 0.85

Tested by

no test coverage detected