Rename column_name to name

This commit is contained in:
Ivan Ukhov
2018-10-06 10:11:18 +02:00
parent cf7a3d7500
commit db5ceccf58
2 changed files with 7 additions and 8 deletions

View File

@ -57,7 +57,7 @@ impl<'l> Statement<'l> {
/// Return the name of a column.
#[inline]
pub fn column_name(&self, i: usize) -> &str {
pub fn name(&self, i: usize) -> &str {
debug_assert!(i < self.columns(), format!("column position has to be between 0 and {}", self.columns() - 1));
unsafe {
let ret = ffi::sqlite3_column_name(self.raw.0, i as c_int);
@ -67,8 +67,8 @@ impl<'l> Statement<'l> {
/// Return column names.
#[inline]
pub fn column_names(&self) -> Vec<&str> {
(0..self.columns()).map(|i| self.column_name(i)).collect()
pub fn names(&self) -> Vec<&str> {
(0..self.columns()).map(|i| self.name(i)).collect()
}
/// Return the type of a column.