From fb7774c6f5175263d1fca7221c3342ba682c92e8 Mon Sep 17 00:00:00 2001 From: gwenn <45554+gwenn@users.noreply.github.com> Date: Mon, 4 Sep 2023 20:59:28 +0200 Subject: [PATCH] Column is used only with column_decltype feature (#1385) --- src/column.rs | 4 ++++ src/lib.rs | 1 + 2 files changed, 5 insertions(+) diff --git a/src/column.rs b/src/column.rs index 590a986..b18eb8a 100644 --- a/src/column.rs +++ b/src/column.rs @@ -3,12 +3,16 @@ use std::str; use crate::{Error, Result, Statement}; /// Information about a column of a SQLite query. +#[cfg(feature = "column_decltype")] +#[cfg_attr(docsrs, doc(cfg(feature = "column_decltype")))] #[derive(Debug)] pub struct Column<'stmt> { name: &'stmt str, decl_type: Option<&'stmt str>, } +#[cfg(feature = "column_decltype")] +#[cfg_attr(docsrs, doc(cfg(feature = "column_decltype")))] impl Column<'_> { /// Returns the name of the column. #[inline] diff --git a/src/lib.rs b/src/lib.rs index 0661883..6424308 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -74,6 +74,7 @@ use crate::raw_statement::RawStatement; use crate::types::ValueRef; pub use crate::cache::CachedStatement; +#[cfg(feature = "column_decltype")] pub use crate::column::Column; pub use crate::error::{to_sqlite_error, Error}; pub use crate::ffi::ErrorCode;