Add SQL statement logging
This commit is contained in:
parent
722f156b7d
commit
9390ae9821
1 changed files with 4 additions and 0 deletions
|
@ -10,6 +10,8 @@ use crate::sql::statement::Statement;
|
|||
use crate::sql::value::Value;
|
||||
use std::time::Instant;
|
||||
|
||||
const NAME: &'static str = "surreal::exe";
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Executor {
|
||||
pub id: Option<String>,
|
||||
|
@ -53,6 +55,8 @@ impl Executor {
|
|||
let mut opt = Options::new(&Auth::No);
|
||||
// Process all statements in query
|
||||
for stm in qry.statements().iter() {
|
||||
// Log the statement
|
||||
debug!(target: NAME, "{}", stm);
|
||||
// Reset errors
|
||||
if self.txn.is_none() {
|
||||
self.err = None;
|
||||
|
|
Loading…
Reference in a new issue