Pre: take Variables instead of Strings in public API, for now.
This commit is contained in:
parent
5718ce0155
commit
8ddbc834ae
2 changed files with 10 additions and 3 deletions
10
src/conn.rs
10
src/conn.rs
|
@ -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>>
|
||||
{
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue