diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-08 14:13:06 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2024-05-08 14:14:03 +0300 |
commit | 71be31b2c14a2d72ff9d301be848d4c5f9e8023d (patch) | |
tree | d4b449b45e33a879f69615c3a90b392648bf3c14 /odb-examples/container/README | |
parent | 8699622a703bc7c9c43297c3eb6b81748dbda4a8 (diff) |
Switch odb-examples READMEs to refer to PostgreSQL instead of MySQL
Diffstat (limited to 'odb-examples/container/README')
-rw-r--r-- | odb-examples/container/README | 16 |
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 |