aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/database.ixx21
-rw-r--r--odb/database.txx25
2 files changed, 21 insertions, 25 deletions
diff --git a/odb/database.ixx b/odb/database.ixx
index c8fe08c..fb26d64 100644
--- a/odb/database.ixx
+++ b/odb/database.ixx
@@ -9,4 +9,25 @@ namespace odb
database ()
{
}
+
+ template <typename T>
+ inline void database::
+ erase (const T& obj)
+ {
+ erase<T> (object_traits<T>::id (obj));
+ }
+
+ template <typename T>
+ inline result<T> database::
+ query ()
+ {
+ return query (odb::query<T> ());
+ }
+
+ template <typename T>
+ inline result<T> database::
+ query (const std::string& q)
+ {
+ return query (odb::query<T> (q));
+ }
}
diff --git a/odb/database.txx b/odb/database.txx
index 377df21..c037892 100644
--- a/odb/database.txx
+++ b/odb/database.txx
@@ -8,9 +8,6 @@
namespace odb
{
- // @@ Should I make these inline?
- //
-
template <typename T>
typename object_traits<T>::id_type database::
persist (T& obj)
@@ -29,7 +26,6 @@ namespace odb
load (const typename object_traits<T>::id_type& id)
{
typedef object_traits<T> traits;
-
typename traits::pointer_type r (find<T> (id));
if (traits::pointer_traits::null_ptr (r))
@@ -78,13 +74,6 @@ namespace odb
template <typename T>
void database::
- erase (const T& obj)
- {
- erase<T> (object_traits<T>::id (obj));
- }
-
- template <typename T>
- void database::
erase (const typename object_traits<T>::id_type& id)
{
if (!transaction::has_current ())
@@ -95,20 +84,6 @@ namespace odb
template <typename T>
result<T> database::
- query ()
- {
- return query (odb::query<T> ());
- }
-
- template <typename T>
- result<T> database::
- query (const std::string& q)
- {
- return query (odb::query<T> (q));
- }
-
- template <typename T>
- result<T> database::
query (const odb::query<T>& q)
{
if (!transaction::has_current ())