pub struct SnowflakeColumn { /* private fields */ }
Expand description
Represents a Snowflake database column with its metadata.
This struct provides information about a column including its name, index position, and type information. It’s typically used when working with query results to understand the structure of returned data.
§Examples
use snowflake_connector_rs::{SnowflakeColumn, SnowflakeColumnType};
let column_type = SnowflakeColumnType::new(
"fixed".to_string(),
false,
None,
None,
None
);
let column = SnowflakeColumn::new(
"user_id".to_string(),
0,
column_type
);
assert_eq!(column.name(), "user_id");
assert_eq!(column.index(), 0);
assert_eq!(column.column_type().snowflake_type(), "fixed");
Implementations§
Source§impl SnowflakeColumn
impl SnowflakeColumn
Sourcepub fn new(name: String, index: usize, column_type: SnowflakeColumnType) -> Self
pub fn new(name: String, index: usize, column_type: SnowflakeColumnType) -> Self
Creates a new SnowflakeColumn
.
§Arguments
name
- The name of the columnindex
- The zero-based index position of the column in the result setcolumn_type
- The type information for this column
§Examples
use snowflake_connector_rs::{SnowflakeColumn, SnowflakeColumnType};
let column_type = SnowflakeColumnType::new(
"text".to_string(),
true,
Some(255),
None,
None
);
let column = SnowflakeColumn::new(
"username".to_string(),
1,
column_type
);
assert_eq!(column.name(), "username");
assert_eq!(column.index(), 1);
pub fn name(&self) -> &str
pub fn column_type(&self) -> &SnowflakeColumnType
pub fn index(&self) -> usize
Trait Implementations§
Source§impl Debug for SnowflakeColumn
impl Debug for SnowflakeColumn
Source§impl PartialEq for SnowflakeColumn
impl PartialEq for SnowflakeColumn
impl Eq for SnowflakeColumn
impl StructuralPartialEq for SnowflakeColumn
Auto Trait Implementations§
impl Freeze for SnowflakeColumn
impl RefUnwindSafe for SnowflakeColumn
impl Send for SnowflakeColumn
impl Sync for SnowflakeColumn
impl Unpin for SnowflakeColumn
impl UnwindSafe for SnowflakeColumn
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more