Disallow indexing of non-indexable columns
This commit is contained in:
parent
7b5b2bf9f3
commit
377c19cf32
2 changed files with 22 additions and 3 deletions
|
|
@ -30,6 +30,18 @@ pub enum IndexableValue {
|
|||
// TODO: what about null?
|
||||
}
|
||||
|
||||
impl DbType {
|
||||
pub fn is_indexable(&self) -> bool {
|
||||
match self {
|
||||
Self::String => true,
|
||||
Self::Int => true,
|
||||
Self::Number => false,
|
||||
Self::Uuid => true,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
impl Value {
|
||||
pub fn to_type(&self) -> DbType {
|
||||
match self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue