Fix improperly escaped strings in stor insert (#12820)

- fixes #12764 

Replaced the custom logic with values_to_sql method that is already used
in crate::database.
This will ensure that handling of parameters is the same between sqlite
and stor.
This commit is contained in:
Maxime Jacob
2024-05-13 21:22:39 -04:00
committed by GitHub
parent 98369985b1
commit cd381b74e0
3 changed files with 228 additions and 76 deletions

View File

@ -5,7 +5,7 @@ use commands::add_commands_decls;
pub use values::{
convert_sqlite_row_to_nu_value, convert_sqlite_value_to_nu_value, open_connection_in_memory,
open_connection_in_memory_custom, SQLiteDatabase, MEMORY_DB,
open_connection_in_memory_custom, values_to_sql, SQLiteDatabase, MEMORY_DB,
};
use nu_protocol::engine::StateWorkingSet;

View File

@ -3,5 +3,5 @@ pub mod sqlite;
pub use sqlite::{
convert_sqlite_row_to_nu_value, convert_sqlite_value_to_nu_value, open_connection_in_memory,
open_connection_in_memory_custom, SQLiteDatabase, MEMORY_DB,
open_connection_in_memory_custom, values_to_sql, SQLiteDatabase, MEMORY_DB,
};