Crate butane_core

Crate butane_core 

Source
Expand description

Library providing functionality used by butane macros and tools.

Re-exports§

pub use query::Query;
pub use sqlval::AsPrimaryKey;
pub use sqlval::FieldType;
pub use sqlval::FromSql;
pub use sqlval::PrimaryKeyType;
pub use sqlval::SqlVal;
pub use sqlval::SqlValRef;
pub use sqlval::ToSql;

Modules§

custom
For supporting additional types with the Pg backend (or other future backends).
db
Types, traits, and methods for interacting with a database.
fkey
Implementation of foreign key relationships between models.
internal
Internals called by Butane codegen. Semver exempt.
many
Implementation of many-to-many relationships between models.
migrations
For working with migrations. If using the butane CLI tool, it is not necessary to use these types directly.
query
Types to support database queries. Most users will use the query!, filter!, and find! macros instead of using this module directly.
sqlval
Types and traits for interacting with a value that can be stored in the database.

Macros§

connection_method_wrapper
debug
Noop for when feature log is not enabled.
error
Noop for when feature log is not enabled.
info
Noop for when feature log is not enabled.
make_compile_error
Create a compiler error.
warn
Noop for when feature log is not enabled.

Structs§

AutoPk
Wrapper around a PrimaryKeyType to indicate the the primary key will be initialized automatically when the object is created in the database. Dereferences to an Option<T>.

Enums§

Error
Butane errors.
SqlType
Enumeration of the types a database value may take.

Traits§

DataObject
An object in the database.
DataObjectOpsSync
DataObject operations that require a live database connection.
DataResult
A type which may be the result of a database query.

Type Aliases§

Result
Result type that uses crate::Error.