@@ -8,9 +8,9 @@ pub trait Backend {
88
99 async fn init ( & self ) -> ( ) ;
1010
11- fn parse_query ( & self , query : & str ) -> Result < String , String > ;
11+ fn parse_query ( & self , query : & str ) -> Result < Vec < String > , String > ;
1212
13- async fn exec ( & mut self , query : String ) -> Vec < String > ;
13+ async fn exec ( & mut self , query : Vec < String > ) -> Vec < String > ;
1414}
1515
1616pub enum BackendType {
@@ -72,7 +72,7 @@ impl BackendType {
7272 }
7373 }
7474
75- pub fn parse_query ( & self , query : & str ) -> Result < String , String > {
75+ pub fn parse_query ( & self , query : & str ) -> Result < Vec < String > , String > {
7676 match self {
7777 #[ cfg( feature = "postgres" ) ]
7878 BackendType :: PostgresOsmosis ( backend) => backend. parse_query ( query) ,
@@ -81,12 +81,12 @@ impl BackendType {
8181 }
8282 }
8383
84- pub async fn exec ( & mut self , query : String ) -> Vec < String > {
84+ pub async fn exec ( & mut self , queries : Vec < String > ) -> Vec < String > {
8585 match self {
8686 #[ cfg( feature = "postgres" ) ]
87- BackendType :: PostgresOsmosis ( backend) => backend. exec ( query ) . await ,
87+ BackendType :: PostgresOsmosis ( backend) => backend. exec ( queries ) . await ,
8888 #[ cfg( feature = "duckdb" ) ]
89- BackendType :: DuckdbQuackosm ( backend) => backend. exec ( query ) . await ,
89+ BackendType :: DuckdbQuackosm ( backend) => backend. exec ( queries ) . await ,
9090 }
9191 }
9292}
0 commit comments