#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Results {
#[prost(string, repeated, tag="1")]
pub rows: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[cfg_attr(feature = "builder", derive(derive_builder::Builder))]
#[cfg_attr(feature = "builder", builder(default, setter(into, strip_option), custom_constructor, build_fn(name = "fallible_build")))]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PreparedStatement {
#[prost(string, tag="1")]
pub sql: ::prost::alloc::string::String,
#[prost(string, repeated, tag="2")]
#[cfg_attr(feature = "builder", builder(setter(custom)))]
pub values: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[cfg(feature = "builder")]
impl PreparedStatement {
pub fn values(&mut self, value: impl IntoIterator<Item = impl Into<String>>) -> &mut Self {
self.values = value.into_iter().map(Into::into).collect();
self
}
pub fn new(sql: impl Into<String>) -> PreparedStatementBuilder {
PreparedStatementBuilder {
sql: Some(sql.into()),
..PreparedStatementBuilder::create_empty()
}
}
}
#[cfg(feature = "builder")]
impl PreparedStatementBuilder {
pub fn build(&self) -> PreparedStatement {
self.fallible_build()
.expect("All required fields were initialized")
}
}