Gluesql running vs custom storage

With gluesql, I see how to implement a custom storage via traits Store and StoreMut. Store | GlueSQL

So now we have:

pub struct MyType

impl Store for MyType { ... }
impl StoreMut for MyType { ... }

Question: how do I now run SQL statements (strings) vs MyType ? [I feel like I am missing something very obvious.]

Thanks!

I'm trying to execute this code here:

impl State_Sql {
    pub fn execute(&mut self, s: &str) {
        let statements = gluesql::core::parse_sql::parse(s).unwrap();
        for s in statements.iter() {
            let _ = gluesql::prelude::execute(self, s);
        }
    }
}

and getting error:

32   |             let _ = gluesql::prelude::execute(self, s);
     |                     -------------------------       ^ expected enum gluesql::core::ast::Statement`, found enum gluesql::core::sqlparser::ast::Statement`

How do I do &str -> the "right" Statement ?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.