mirror of
https://github.com/aljazceru/turso.git
synced 2025-12-18 00:54:19 +01:00
Update integration tests to use the new retrieval methods to access Record values.
This commit is contained in:
@@ -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!(),
|
||||
|
||||
Reference in New Issue
Block a user