Update integration tests to use the new retrieval methods to access Record values.

This commit is contained in:
Tiago Ribeiro
2025-02-10 00:22:25 -07:00
parent c071e47b03
commit d00b44d7cd
5 changed files with 23 additions and 23 deletions

View File

@@ -43,8 +43,8 @@ fn test_simple_overflow_page() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values[0].to_value();
let text = row.values[1].to_value();
let first_value = row.get_value(0).to_value();
let text = row.get_value(1).to_value();
let id = match first_value {
Value::Integer(i) => i as i32,
Value::Float(f) => f as i32,
@@ -118,8 +118,8 @@ fn test_sequential_overflow_page() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values[0].to_value();
let text = row.values[1].to_value();
let first_value = row.get_value(0).to_value();
let text = row.get_value(1).to_value();
let id = match first_value {
Value::Integer(i) => i as i32,
Value::Float(f) => f as i32,
@@ -190,7 +190,7 @@ fn test_sequential_write() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values.first().expect("missing id");
let first_value = row.get_values().first().expect("missing id");
let id = match first_value.to_value() {
Value::Integer(i) => i as i32,
Value::Float(f) => f as i32,
@@ -256,7 +256,7 @@ fn test_regression_multi_row_insert() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values.first().expect("missing id");
let first_value = row.get_values().first().expect("missing id");
let id = match first_value.to_value() {
Value::Float(f) => f as i32,
_ => panic!("expected float"),
@@ -302,7 +302,7 @@ fn test_statement_reset() -> anyhow::Result<()> {
match stmt.step()? {
StepResult::Row => {
let row = stmt.row().unwrap();
assert_eq!(row.values[0].to_value(), Value::Integer(1));
assert_eq!(row.get_value(0).to_value(), Value::Integer(1));
break;
}
StepResult::IO => tmp_db.io.run_once()?,
@@ -316,7 +316,7 @@ fn test_statement_reset() -> anyhow::Result<()> {
match stmt.step()? {
StepResult::Row => {
let row = stmt.row().unwrap();
assert_eq!(row.values[0].to_value(), Value::Integer(1));
assert_eq!(row.get_value(0).to_value(), Value::Integer(1));
break;
}
StepResult::IO => tmp_db.io.run_once()?,
@@ -366,7 +366,7 @@ fn test_wal_checkpoint() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values[0].to_value();
let first_value = row.get_value(0).to_value();
let id = match first_value {
Value::Integer(i) => i as i32,
Value::Float(f) => f as i32,
@@ -430,7 +430,7 @@ fn test_wal_restart() -> anyhow::Result<()> {
match rows.step()? {
StepResult::Row => {
let row = rows.row().unwrap();
let first_value = row.values[0].to_value();
let first_value = row.get_value(0).to_value();
let count = match first_value {
Value::Integer(i) => i,
_ => unreachable!(),