diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-05-09 20:35:52 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2019-05-09 20:35:52 +0100 |
commit | 712960df1826305def34df4b6dd5c4343b8ec09d (patch) | |
tree | a09bf67202ed0c96415f2b5fd97be22986efa6a8 /libpqpp/pq-mock.h | |
parent | Get server version into a const local on construction (diff) | |
download | libdbpp-postgresql-712960df1826305def34df4b6dd5c4343b8ec09d.tar.bz2 libdbpp-postgresql-712960df1826305def34df4b6dd5c4343b8ec09d.tar.xz libdbpp-postgresql-712960df1826305def34df4b6dd5c4343b8ec09d.zip |
Create mock databases in a temporary directory
Requires v9.3 server for COPY ... TO PROGRAM ... support, which is used
to get the server to create a directory with suitable permissions. This
directory is created in the system temporary directory and used as the
default tablespace for the mock database.
Diffstat (limited to 'libpqpp/pq-mock.h')
-rw-r--r-- | libpqpp/pq-mock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libpqpp/pq-mock.h b/libpqpp/pq-mock.h index c802080..b5f4f24 100644 --- a/libpqpp/pq-mock.h +++ b/libpqpp/pq-mock.h @@ -15,8 +15,11 @@ namespace PQ { DB::ConnectionPtr openConnection() const override; protected: + void CreateNewDatabase() const override; void DropDatabase() const override; void SetTablesToUnlogged() const; + bool hasCopyToProgram() const; + const std::filesystem::path tablespacePath; const int serverVersion; }; } |