aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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& name = "");
- // C++98/03 version:
+ typedef void data_migration_function_type (database&);
+
+ // Common (for all the databases) data migration, C++98/03 version:
//
- typedef void (*data_migration_function_type) (database&);
+ template <schema_version v, schema_version base>
+ static void
+ data_migration_function (data_migration_function_type*,
+ const std::string& name = "");
- // C++11 version:
+ // Common (for all the databases) data migration, C++11 version:
//
- typedef std::function<void (database&)> data_migration_function_type;
+ template <schema_version v, schema_version base>
+ static void
+ data_migration_function (std::function<data_migration_function_type>,
+ const std::string& name = "");
- // Common (for all the databases) data migration.
+ // Database-specific data migration, C++98/03 version:
//
template <schema_version v, schema_version base>
static void
- data_migration_function (data_migration_function_type,
+ data_migration_function (database&,
+ data_migration_function_type*,
const std::string& name = "");
- // Database-specific data migration.
+ template <schema_version v, schema_version base>
+ static void
+ data_migration_function (database_id,
+ data_migration_function_type*,
+ const std::string& name = "");
+
+ // Database-specific data migration, C++11 version:
//
template <schema_version v, schema_version base>
static void
data_migration_function (database&,
- data_migration_function_type,
+ std::function<data_migration_function_type>,
const std::string& name = "");
template <schema_version v, schema_version base>
static void
data_migration_function (database_id,
- data_migration_function_type,
+ std::function<data_migration_function_type>,
const std::string& name = "");
};
- // Static data migration function registration.
+ // Static data migration function registration, C++98/03 version:
+ //
+ template <schema_version v, schema_version base>
+ struct data_migration_entry
+ {
+ data_migration_entry (data_migration_function_type*,
+ const std::string& name = "");
+
+ data_migration_entry (database_id,
+ data_migration_function_type*,
+ const std::string& name = "");
+ };
+
+ // Static data migration function registration, C++11 version:
//
template <schema_version v, schema_version base>
struct data_migration_entry
{
- data_migration_entry (data_migration_function_type,
+ data_migration_entry (std::function<data_migration_function_type>,
const std::string& name = "");
data_migration_entry (database_id,
- data_migration_function_type,
+ std::function<data_migration_function_type>,
const std::string& name = "");
};
}