aboutsummaryrefslogtreecommitdiff
path: root/doc/manual.xhtml
diff options
context:
space:
mode:
authorMichael Shepanski <michael@codesynthesis.com>2014-10-30 15:10:56 +1100
committerMichael Shepanski <michael@codesynthesis.com>2014-10-30 15:28:05 +1100
commit3daba7d9d24c5fb85e2ee8c21b23b31efb8b278c (patch)
treee16ecd6a686a93b2efbae08f96ad744d892ed89f /doc/manual.xhtml
parent65485663ce42b92f3f4f1ea62910fd91d8ec7b29 (diff)
Allow lambdas & std::functions as query factories with C++-98 builds of libodb
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r--doc/manual.xhtml52
1 files changed, 40 insertions, 12 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml
index 13203f0..dd03def 100644
--- a/doc/manual.xhtml
+++ b/doc/manual.xhtml
@@ -12605,46 +12605,74 @@ namespace odb
schema_version = 0,
const std::string&amp; name = "");
- // C++98/03 version:
+ typedef void data_migration_function_type (database&amp;);
+
+ // Common (for all the databases) data migration, C++98/03 version:
//
- typedef void (*data_migration_function_type) (database&amp;);
+ template &lt;schema_version v, schema_version base>
+ static void
+ data_migration_function (data_migration_function_type*,
+ const std::string&amp; name = "");
- // C++11 version:
+ // Common (for all the databases) data migration, C++11 version:
//
- typedef std::function&lt;void (database&amp;)> data_migration_function_type;
+ template &lt;schema_version v, schema_version base>
+ static void
+ data_migration_function (std::function&lt;data_migration_function_type>,
+ const std::string&amp; name = "");
- // Common (for all the databases) data migration.
+ // Database-specific data migration, C++98/03 version:
//
template &lt;schema_version v, schema_version base>
static void
- data_migration_function (data_migration_function_type,
+ data_migration_function (database&amp;,
+ data_migration_function_type*,
const std::string&amp; name = "");
- // Database-specific data migration.
+ template &lt;schema_version v, schema_version base>
+ static void
+ data_migration_function (database_id,
+ data_migration_function_type*,
+ const std::string&amp; name = "");
+
+ // Database-specific data migration, C++11 version:
//
template &lt;schema_version v, schema_version base>
static void
data_migration_function (database&amp;,
- data_migration_function_type,
+ std::function&lt;data_migration_function_type>,
const std::string&amp; name = "");
template &lt;schema_version v, schema_version base>
static void
data_migration_function (database_id,
- data_migration_function_type,
+ std::function&lt;data_migration_function_type>,
const std::string&amp; name = "");
};
- // Static data migration function registration.
+ // Static data migration function registration, C++98/03 version:
+ //
+ template &lt;schema_version v, schema_version base>
+ struct data_migration_entry
+ {
+ data_migration_entry (data_migration_function_type*,
+ const std::string&amp; name = "");
+
+ data_migration_entry (database_id,
+ data_migration_function_type*,
+ const std::string&amp; name = "");
+ };
+
+ // Static data migration function registration, C++11 version:
//
template &lt;schema_version v, schema_version base>
struct data_migration_entry
{
- data_migration_entry (data_migration_function_type,
+ data_migration_entry (std::function&lt;data_migration_function_type>,
const std::string&amp; name = "");
data_migration_entry (database_id,
- data_migration_function_type,
+ std::function&lt;data_migration_function_type>,
const std::string&amp; name = "");
};
}