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

View file

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