diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-08 18:21:32 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-02-08 18:21:32 +0200 |
commit | c2f8b442ee121f45f7513c4b8e1d6d52628ad2fc (patch) | |
tree | 8fea6f2d7d07fc3696cc4693b7a9fcf53d41e55c /doc/manual.xhtml | |
parent | 2cf38b8662d9ace6dc400f5834e70bf4ba713a18 (diff) |
Add schema_catalog::exists() function
Diffstat (limited to 'doc/manual.xhtml')
-rw-r--r-- | doc/manual.xhtml | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/manual.xhtml b/doc/manual.xhtml index c620388..8fa672d 100644 --- a/doc/manual.xhtml +++ b/doc/manual.xhtml @@ -2852,6 +2852,12 @@ namespace odb public: static void create_schema (database&, const std::string& name = ""); + + static bool + exists (database_id, const std::string& name); + + static bool + exists (const database&, const std::string& name) }; } </pre> @@ -2866,9 +2872,11 @@ namespace odb custom schema names and then use these names as a second argument to <code>create_schema()</code>. If the schema is not found, <code>create_schema()</code> throws the - <code>odb::unknown_schema</code> exception. The - <code>create_schema()</code> function should be called within - a transaction.</p> + <code>odb::unknown_schema</code> exception. You can use the + <code>exists()</code> function to check whether a schema for the + specified database and with the specified name exists in the + catalog. Note also that the <code>create_schema()</code> function + should be called within a transaction.</p> <p>Finally, we can also use a custom database schema with ODB. This approach can work similarly to the standalone SQL file described above except that |