mirror of
https://github.com/fluencelabs/fluid
synced 2025-04-24 14:22:18 +00:00
rename bytes to query
This commit is contained in:
parent
3b1d45a4d7
commit
74d57cd408
@ -1,15 +1,15 @@
|
||||
use crate::errors::{err_msg, AppResult};
|
||||
use crate::sqlite;
|
||||
|
||||
pub fn query(bytes: &str) -> AppResult<String> {
|
||||
let response = sqlite::call(bytes.as_bytes());
|
||||
pub fn query(query: &str) -> AppResult<String> {
|
||||
let response = sqlite::call(query.as_bytes());
|
||||
|
||||
// Decode query result to a utf8 string
|
||||
String::from_utf8(response).map_err(|e| {
|
||||
log::error!("unable to decode result from bytes: {:#x?}", bytes);
|
||||
err_msg(&format!(
|
||||
"unable to decode result from bytes {:#x?}: {}",
|
||||
bytes, e
|
||||
query, e
|
||||
))
|
||||
})
|
||||
}
|
||||
|
@ -1,15 +1,15 @@
|
||||
use crate::errors::{err_msg, AppResult};
|
||||
use crate::sqlite;
|
||||
|
||||
pub fn query(bytes: &str) -> AppResult<String> {
|
||||
let response = sqlite::call(bytes.as_bytes());
|
||||
pub fn query(query: &str) -> AppResult<String> {
|
||||
let response = sqlite::call(query.as_bytes());
|
||||
|
||||
// Decode query result to a utf8 string
|
||||
String::from_utf8(response).map_err(|e| {
|
||||
log::error!("unable to decode result from bytes: {:#x?}", bytes);
|
||||
err_msg(&format!(
|
||||
"unable to decode result from bytes {:#x?}: {}",
|
||||
bytes, e
|
||||
query, e
|
||||
))
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user