summaryrefslogtreecommitdiff
path: root/odb-examples/container/README
diff options
context:
space:
mode:
Diffstat (limited to 'odb-examples/container/README')
-rw-r--r--odb-examples/container/README16
1 files changed, 8 insertions, 8 deletions
diff --git a/odb-examples/container/README b/odb-examples/container/README
index 87f9bc6..d11d676 100644
--- a/odb-examples/container/README
+++ b/odb-examples/container/README
@@ -19,7 +19,7 @@ person.sql
odb --std c++11 -d <database> --generate-schema person.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
database.hxx
Contains the create_database() function which instantiates the concrete
@@ -38,25 +38,25 @@ driver.cxx
in the database, then re-loads and prints the object to verify that the
changes have been made persistent.
-To compile and link the example manually from the command line we can use
-the following commands (using MySQL as an example; replace 'c++' with your
+To compile and link the example manually from the command line we can use the
+following commands (using PostgreSQL as an example; replace 'c++' with your
C++ compiler name):
c++ -c person-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o person-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o person-odb.o -lodb-pgsql -lodb
To run the example we may first need to create the database schema (for some
database systems, such as SQLite, the schema is embedded into the generated
-code which makes this step unnecessary). Using MySQL as an example, this
+code which makes this step unnecessary). Using PostgreSQL as an example, this
can be achieved with the following command:
-mysql --user=odb_test --database=odb_test < person.sql
+psql --username=odb_test --dbname=odb_test -f person.sql
Here we use 'odb_test' as the database login and also 'odb_test' as the
database name.
-Once the database schema is ready, we can run the example (using MySQL as
+Once the database schema is ready, we can run the example (using PostgreSQL as
the database):
./driver --user odb_test --database odb_test