Convert query-translator/ to query-projector's ProjectorError.
This commit is contained in:
parent
b2249f189d
commit
ac1b0b15fe
2 changed files with 5 additions and 4 deletions
|
@ -9,6 +9,7 @@
|
||||||
// specific language governing permissions and limitations under the License.
|
// specific language governing permissions and limitations under the License.
|
||||||
|
|
||||||
extern crate failure;
|
extern crate failure;
|
||||||
|
|
||||||
extern crate mentat_core;
|
extern crate mentat_core;
|
||||||
extern crate mentat_query;
|
extern crate mentat_query;
|
||||||
extern crate mentat_query_algebrizer;
|
extern crate mentat_query_algebrizer;
|
||||||
|
@ -16,8 +17,6 @@ extern crate mentat_query_projector;
|
||||||
extern crate mentat_query_sql;
|
extern crate mentat_query_sql;
|
||||||
extern crate mentat_sql;
|
extern crate mentat_sql;
|
||||||
|
|
||||||
use failure::Error;
|
|
||||||
|
|
||||||
mod translate;
|
mod translate;
|
||||||
|
|
||||||
pub use mentat_query_sql::{
|
pub use mentat_query_sql::{
|
||||||
|
@ -30,4 +29,6 @@ pub use translate::{
|
||||||
query_to_select,
|
query_to_select,
|
||||||
};
|
};
|
||||||
|
|
||||||
type Result<T> = std::result::Result<T, Error>;
|
// query-translator could be folded into query-projector; for now, just type alias the errors.
|
||||||
|
pub type TranslatorError = mentat_query_projector::ProjectorError;
|
||||||
|
pub type Result<T> = std::result::Result<T, TranslatorError>;
|
||||||
|
|
|
@ -521,5 +521,5 @@ pub fn query_to_select(schema: &Schema, query: AlgebraicQuery) -> Result<Project
|
||||||
projector: datalog_projector,
|
projector: datalog_projector,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}).map_err(|e| e.into())
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue