Pre: take Variables instead of Strings in public API, for now.

This commit is contained in:
Richard Newman 2017-04-17 13:30:35 -07:00
parent 5718ce0155
commit 8ddbc834ae
2 changed files with 10 additions and 3 deletions

View file

@ -16,18 +16,24 @@ use std::sync::{Arc, Mutex};
use rusqlite;
use edn;
use errors::*;
use mentat_core::{
Schema,
TypedValue,
};
use mentat_db::db;
use mentat_db::{
transact,
PartitionMap,
TxReport,
};
use mentat_query::Variable;
use mentat_tx_parser;
use errors::*;
use query::{
q_once,
QueryResults,
@ -112,7 +118,7 @@ impl Conn {
query: &str,
inputs: T,
limit: U) -> Result<QueryResults>
where T: Into<Option<HashMap<String, TypedValue>>>,
where T: Into<Option<HashMap<Variable, TypedValue>>>,
U: Into<Option<u64>>
{

View file

@ -23,6 +23,7 @@ use mentat_query_algebrizer::algebrize;
pub use mentat_query::{
NamespacedKeyword,
PlainSymbol,
Variable,
};
use mentat_query_parser::{
@ -59,7 +60,7 @@ pub fn q_once<'sqlite, 'schema, 'query, T, U>
query: &'query str,
inputs: T,
limit: U) -> QueryExecutionResult
where T: Into<Option<HashMap<String, TypedValue>>>,
where T: Into<Option<HashMap<Variable, TypedValue>>>,
U: Into<Option<u64>>
{
// TODO: validate inputs.