Crate schema_connector
source ·Expand description
This crate defines the API exposed by the connectors to the schema engine core. The entry point for this API is the MigrationConnector trait.
Re-exports
pub use warnings::Warnings;
Modules
- Migrations directory management.
- Warnings generator for Introspection
Structs
- The general error reporting type for migration connectors.
- Parameters passed from the core to connectors on initialization.
- A database schema. Part of the MigrationConnector API.
- The errors and warnings emitted by the DestructiveChangeChecker.
- A no-op ConnectorHost.
- Input parameters for a database introspection.
- The result structure from a successful introspection run.
- The output type from introspection.
- A boxed migration, opaque to the schema engine core. The connectors are sole responsible for producing and understanding migrations — the core just orchestrates.
- An applied migration, as returned by list_migrations.
- A warning emitted by DestructiveChangeChecker. Warnings will prevent a migration from being applied, unless the
force
flag is passed. - A nonempty set of namespaces. It is assumed that the namespaces are unique. It is often passed around an Option
for when the namespaces cannot be inferred, or when the MultiSchema preview feature is not enabled. - Error returned when the persistence is not initialized.
- An unexecutable migration step detected by the DestructiveChangeChecker.
- Defines a view in the database.
Enums
- Control type for composite type traversal.
- Diffable things
Traits
- An abstract host for a migration connector. It exposes IO that is not directly performed by the connectors.
- Implementors of this trait are responsible for checking whether a migration could lead to data loss, or if it would be potentially unexecutable.
- Management of imperative migrations state in the database.
- The top-level trait for connectors. This is the abstraction the schema engine core relies on to interface with different database backends.
Type Aliases
- Alias for a pinned, boxed future, used by the traits.
- Shorthand for a Result where the error variant is a ConnectorError.
- A timestamp.