Expand description
Function DDL statement builders
This module provides builders for function-related DDL statements:
CreateFunctionStatement: CREATE FUNCTION statementAlterFunctionStatement: ALTER FUNCTION statementDropFunctionStatement: DROP FUNCTION statement
§Backend Support
| Backend | CREATE | ALTER | DROP |
|---|---|---|---|
| PostgreSQL | ✅ | ✅ | ✅ |
| MySQL | ✅ | ✅ | ✅ |
| SQLite | ❌ (panics) | ❌ (panics) | ❌ (panics) |
| CockroachDB | ✅ | ✅ | ✅ |
§PostgreSQL vs MySQL Differences
- Language: PostgreSQL supports PL/pgSQL, MySQL has its own syntax
- Dollar quotes: PostgreSQL uses
$$for function body, MySQL uses BEGIN/END - Parameter placeholders: PostgreSQL uses
$1, $2, MySQL uses parameters directly
Re-exports§
pub use alter_function::AlterFunctionStatement;pub use create_function::CreateFunctionStatement;pub use drop_function::DropFunctionStatement;
Modules§
- alter_
function - ALTER FUNCTION statement builder
- create_
function - CREATE FUNCTION statement builder
- drop_
function - DROP FUNCTION statement builder