invert condition for whether name is unique
Signed-off-by: Folling <mail@folling.io>
This commit is contained in:
parent
48eb35161e
commit
3ab071403d
1 changed files with 3 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ template<typename O>
|
|||
project->db->query_one<bool>("SELECT EXISTS(SELECT 1 FROM `blueprints` WHERE `name` = ?)", name)
|
||||
);
|
||||
|
||||
return exists;
|
||||
return !exists;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline bool name_is_unique(
|
||||
|
|
@ -80,7 +80,7 @@ template<typename O>
|
|||
project->db->query_one<bool>("SELECT EXISTS(SELECT 1 FROM `entities` WHERE `name` = ?)", name)
|
||||
);
|
||||
|
||||
return exists;
|
||||
return !exists;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline bool
|
||||
|
|
@ -93,7 +93,7 @@ name_is_unique(IkarusProject const * project, std::string_view name, IkarusPrope
|
|||
project->db->query_one<bool>("SELECT EXISTS(SELECT 1 FROM `properties` WHERE `name` = ? AND `scope` = ?)", name, scope->get_id())
|
||||
);
|
||||
|
||||
return exists;
|
||||
return !exists;
|
||||
}
|
||||
|
||||
[[nodiscard]] inline bool
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue