Document which features are required, and add vtab usage examples (#669)

This commit is contained in:
Thom Chiovoloni
2020-04-05 22:15:27 -07:00
committed by GitHub
parent 6edf72857e
commit 6617db59fb
16 changed files with 164 additions and 97 deletions

View File

@@ -13,13 +13,14 @@ pub enum FromSqlError {
/// requested type.
OutOfRange(i64),
/// Error returned when reading an `i128` from a blob with a size
/// other than 16. Only available when the `i128_blob` feature is enabled.
/// `feature = "i128_blob"` Error returned when reading an `i128` from a
/// blob with a size other than 16. Only available when the `i128_blob`
/// feature is enabled.
#[cfg(feature = "i128_blob")]
InvalidI128Size(usize),
/// Error returned when reading a `uuid` from a blob with a size
/// other than 16. Only available when the `uuid` feature is enabled.
/// `feature = "uuid"` Error returned when reading a `uuid` from a blob with
/// a size other than 16. Only available when the `uuid` feature is enabled.
#[cfg(feature = "uuid")]
InvalidUuidSize(usize),

View File

@@ -14,10 +14,12 @@ pub enum ToSqlOutput<'a> {
/// An owned SQLite-representable value.
Owned(Value),
/// A BLOB of the given length that is filled with zeroes.
/// `feature = "blob"` A BLOB of the given length that is filled with
/// zeroes.
#[cfg(feature = "blob")]
ZeroBlob(i32),
/// `feature = "array"`
#[cfg(feature = "array")]
Array(Array),
}