summaryrefslogtreecommitdiff
path: root/libpqpp/pq-mock.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-05-09 20:35:52 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2019-05-09 20:35:52 +0100
commit712960df1826305def34df4b6dd5c4343b8ec09d (patch)
treea09bf67202ed0c96415f2b5fd97be22986efa6a8 /libpqpp/pq-mock.h
parentGet server version into a const local on construction (diff)
downloadlibdbpp-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.h3
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;
};
}