Fix release builds (#4559)
This commit is contained in:
parent
c4d2ad2d64
commit
1f6e6fcfc5
5 changed files with 13 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
||||||
use crate::err::Error;
|
use crate::err::Error;
|
||||||
use crate::key::change;
|
use crate::key::change;
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
use crate::key::debug::Sprintable;
|
use crate::key::debug::Sprintable;
|
||||||
use crate::kvs::Transaction;
|
use crate::kvs::Transaction;
|
||||||
use crate::vs;
|
use crate::vs;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
use crate::cf::{ChangeSet, DatabaseMutation, TableMutations};
|
use crate::cf::{ChangeSet, DatabaseMutation, TableMutations};
|
||||||
use crate::err::Error;
|
use crate::err::Error;
|
||||||
use crate::key::change;
|
use crate::key::change;
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
use crate::key::debug::Sprintable;
|
use crate::key::debug::Sprintable;
|
||||||
use crate::kvs::Transaction;
|
use crate::kvs::Transaction;
|
||||||
use crate::sql::statements::show::ShowSince;
|
use crate::sql::statements::show::ShowSince;
|
||||||
|
|
|
@ -607,6 +607,7 @@ fn kind_to_type(kind: Kind, types: &mut Vec<Type>) -> Result<TypeRef, GqlError>
|
||||||
Kind::Set(_, _) => return Err(schema_error("Kind::Set is not yet supported")),
|
Kind::Set(_, _) => return Err(schema_error("Kind::Set is not yet supported")),
|
||||||
Kind::Array(k, _) => TypeRef::List(Box::new(kind_to_type(*k, types)?)),
|
Kind::Array(k, _) => TypeRef::List(Box::new(kind_to_type(*k, types)?)),
|
||||||
Kind::Function(_, _) => return Err(schema_error("Kind::Function is not yet supported")),
|
Kind::Function(_, _) => return Err(schema_error("Kind::Function is not yet supported")),
|
||||||
|
Kind::Range => return Err(schema_error("Kind::Range is not yet supported")),
|
||||||
};
|
};
|
||||||
|
|
||||||
let out = match optional {
|
let out = match optional {
|
||||||
|
@ -670,6 +671,7 @@ fn filter_from_type(
|
||||||
Kind::Set(_, _) => {}
|
Kind::Set(_, _) => {}
|
||||||
Kind::Array(_, _) => {}
|
Kind::Array(_, _) => {}
|
||||||
Kind::Function(_, _) => {}
|
Kind::Function(_, _) => {}
|
||||||
|
Kind::Range => {}
|
||||||
};
|
};
|
||||||
Ok(filter)
|
Ok(filter)
|
||||||
}
|
}
|
||||||
|
@ -1110,5 +1112,6 @@ fn gql_to_sql_kind(val: &GqlValue, kind: Kind) -> Result<SqlValue, GqlError> {
|
||||||
_ => Err(type_error(kind, val)),
|
_ => Err(type_error(kind, val)),
|
||||||
},
|
},
|
||||||
Kind::Function(_, _) => Err(resolver_error("Sets are not yet supported")),
|
Kind::Function(_, _) => Err(resolver_error("Sets are not yet supported")),
|
||||||
|
Kind::Range => Err(resolver_error("Ranges are not yet supported")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,6 +6,7 @@ use crate::dbs::node::Timestamp;
|
||||||
use crate::doc::CursorValue;
|
use crate::doc::CursorValue;
|
||||||
use crate::err::Error;
|
use crate::err::Error;
|
||||||
use crate::idg::u32::U32;
|
use crate::idg::u32::U32;
|
||||||
|
#[cfg(debug_assertions)]
|
||||||
use crate::key::debug::Sprintable;
|
use crate::key::debug::Sprintable;
|
||||||
use crate::kvs::batch::Batch;
|
use crate::kvs::batch::Batch;
|
||||||
use crate::kvs::clock::SizedClock;
|
use crate::kvs::clock::SizedClock;
|
||||||
|
|
|
@ -76,10 +76,13 @@ where
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
let state = req.extensions()
|
{
|
||||||
|
let state = req
|
||||||
|
.extensions()
|
||||||
.get::<crate::net::AppState>()
|
.get::<crate::net::AppState>()
|
||||||
.expect("state extractor should always succeed");
|
.expect("state extractor should always succeed");
|
||||||
debug_assert!(Arc::ptr_eq(&state.datastore, &cache.datastore));
|
debug_assert!(Arc::ptr_eq(&state.datastore, &cache.datastore));
|
||||||
|
}
|
||||||
|
|
||||||
let executor = match cache.get_schema(session).await {
|
let executor = match cache.get_schema(session).await {
|
||||||
Ok(e) => e,
|
Ok(e) => e,
|
||||||
|
|
Loading…
Reference in a new issue