mirror of
https://github.com/fluencelabs/sqlite-wasm-connector
synced 2025-06-27 22:11:32 +00:00
Rename column_name to name
This commit is contained in:
@ -146,17 +146,16 @@ fn statement_columns() {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn statement_column_name() {
|
||||
fn statement_name() {
|
||||
let connection = setup_users(":memory:");
|
||||
let statement = "SELECT id, name, age, photo as user_photo FROM users";
|
||||
let statement = ok!(connection.prepare(statement));
|
||||
|
||||
assert_eq!(statement.columns(), 4);
|
||||
|
||||
let column_names = statement.column_names();
|
||||
assert_eq!(column_names, vec!["id", "name", "age", "user_photo"]);
|
||||
assert_eq!("user_photo", statement.column_name(3));
|
||||
|
||||
let names = statement.names();
|
||||
assert_eq!(names, vec!["id", "name", "age", "user_photo"]);
|
||||
assert_eq!("user_photo", statement.name(3));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user