mirror of
https://github.com/isar/rusqlite.git
synced 2025-04-04 14:24:27 +08:00
Fix parsing of virtual table parameters
This commit is contained in:
parent
bda9d01f85
commit
dbad1dd333
@ -350,7 +350,9 @@ mod test {
|
|||||||
fn test_csv_module() -> Result<()> {
|
fn test_csv_module() -> Result<()> {
|
||||||
let db = Connection::open_in_memory()?;
|
let db = Connection::open_in_memory()?;
|
||||||
csvtab::load_module(&db)?;
|
csvtab::load_module(&db)?;
|
||||||
db.execute_batch("CREATE VIRTUAL TABLE vtab USING csv(filename='test.csv', header=yes)")?;
|
db.execute_batch(
|
||||||
|
"CREATE VIRTUAL TABLE vtab USING csv(filename = 'test.csv', header = yes)",
|
||||||
|
)?;
|
||||||
|
|
||||||
{
|
{
|
||||||
let mut s = db.prepare("SELECT rowid, * FROM vtab")?;
|
let mut s = db.prepare("SELECT rowid, * FROM vtab")?;
|
||||||
|
@ -922,7 +922,7 @@ pub fn parameter(c_slice: &[u8]) -> Result<(&str, &str)> {
|
|||||||
if let Some(key) = split.next() {
|
if let Some(key) = split.next() {
|
||||||
if let Some(value) = split.next() {
|
if let Some(value) = split.next() {
|
||||||
let param = key.trim();
|
let param = key.trim();
|
||||||
let value = dequote(value);
|
let value = dequote(value.trim());
|
||||||
return Ok((param, value));
|
return Ok((param, value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user