summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-05-08 14:13:06 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-05-08 14:14:03 +0300
commit71be31b2c14a2d72ff9d301be848d4c5f9e8023d (patch)
treed4b449b45e33a879f69615c3a90b392648bf3c14
parent8699622a703bc7c9c43297c3eb6b81748dbda4a8 (diff)
Switch odb-examples READMEs to refer to PostgreSQL instead of MySQLHEADmaster
-rw-r--r--odb-examples/access/README16
-rw-r--r--odb-examples/c++11/README16
-rw-r--r--odb-examples/composite/README16
-rw-r--r--odb-examples/container/README16
-rw-r--r--odb-examples/hello/README16
-rw-r--r--odb-examples/inheritance/polymorphism/README16
-rw-r--r--odb-examples/inheritance/reuse/README16
-rw-r--r--odb-examples/inverse/README16
-rw-r--r--odb-examples/mapping/README21
-rw-r--r--odb-examples/optimistic/README16
-rw-r--r--odb-examples/pimpl/README16
-rw-r--r--odb-examples/prepared/README16
-rw-r--r--odb-examples/query/README16
-rw-r--r--odb-examples/relationship/README16
-rw-r--r--odb-examples/schema/custom/README14
-rw-r--r--odb-examples/schema/embedded/README14
-rw-r--r--odb-examples/section/README16
-rw-r--r--odb-examples/view/README16
18 files changed, 146 insertions, 143 deletions
diff --git a/odb-examples/access/README b/odb-examples/access/README
index 7fb8b0e..aeb0830 100644
--- a/odb-examples/access/README
+++ b/odb-examples/access/README
@@ -23,7 +23,7 @@ person.sql
odb --std c++11 -d <database> --generate-query --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
@@ -39,25 +39,25 @@ driver.cxx
instance. Then it executes a number of database transactions on the 'person'
objects.
-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
diff --git a/odb-examples/c++11/README b/odb-examples/c++11/README
index 638b9a2..0cf15ac 100644
--- a/odb-examples/c++11/README
+++ b/odb-examples/c++11/README
@@ -31,7 +31,7 @@ employee.sql
employee.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
@@ -50,25 +50,25 @@ driver.cxx
relationships. Finally, the driver performs a database query and iterates
over the result printing basic information about the returned objects.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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
diff --git a/odb-examples/composite/README b/odb-examples/composite/README
index c6228a3..39c227e 100644
--- a/odb-examples/composite/README
+++ b/odb-examples/composite/README
@@ -26,7 +26,7 @@ person.sql
odb --std c++11 -d <database> --generate-schema --generate-query 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
@@ -45,25 +45,25 @@ driver.cxx
persistent. Finally, the driver performs a database query which uses a
data member from the composite value type in its criterion.
-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
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
diff --git a/odb-examples/hello/README b/odb-examples/hello/README
index 61c71b7..bbe0942 100644
--- a/odb-examples/hello/README
+++ b/odb-examples/hello/README
@@ -23,7 +23,7 @@ person.sql
odb --std c++11 -d <database> --generate-query --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
@@ -39,25 +39,25 @@ driver.cxx
instance. Then it executes a number of database transactions on persistent
objects.
-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
diff --git a/odb-examples/inheritance/polymorphism/README b/odb-examples/inheritance/polymorphism/README
index 15a8543..9ae4355 100644
--- a/odb-examples/inheritance/polymorphism/README
+++ b/odb-examples/inheritance/polymorphism/README
@@ -28,7 +28,7 @@ employee.sql
odb --std c++11 -d <database> --generate-schema --generate-query employee.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
@@ -53,26 +53,26 @@ driver.cxx
each object. Finally, the driver erases the state of the persistent
objects from the database, again using the base class interface.
-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 employee.cxx
c++ -c employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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
diff --git a/odb-examples/inheritance/reuse/README b/odb-examples/inheritance/reuse/README
index 83f7bd5..bb1f69a 100644
--- a/odb-examples/inheritance/reuse/README
+++ b/odb-examples/inheritance/reuse/README
@@ -26,7 +26,7 @@ employee.sql
odb --std c++11 -d <database> --generate-schema --generate-query employee.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
@@ -45,25 +45,25 @@ driver.cxx
performs a database query which uses a data member from the base class
in its criterion.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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
diff --git a/odb-examples/inverse/README b/odb-examples/inverse/README
index 57fcdd0..493b0d1 100644
--- a/odb-examples/inverse/README
+++ b/odb-examples/inverse/README
@@ -26,7 +26,7 @@ employee.sql
--generate-session --default-pointer std::shared_ptr employee.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --generate-session option is used to enable session support for all
the persistent classes in employee.hxx. The --default-pointer option is
@@ -50,25 +50,25 @@ driver.cxx
the driver performs a database query which uses a data member from a related
object in its criterion.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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
diff --git a/odb-examples/mapping/README b/odb-examples/mapping/README
index 21c0e77..48bbe4f 100644
--- a/odb-examples/mapping/README
+++ b/odb-examples/mapping/README
@@ -13,6 +13,9 @@ person.hxx
traits.hxx
traits-mysql.hxx
traits-sqlite.hxx
+traits-pgsql.hxx
+traits-oracle.hxx
+traits-mssql.hxx
ODB 'value_traits' template specializations for the 'bool' and 'date'
types. These specializations implement conversion between these types
and their database counterparts.
@@ -31,7 +34,7 @@ person.sql
--hxx-prologue "#include \"traits.hxx\"" person.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --hxx-prologue option included the traits.hxx header at the beginning
of the generated person-odb.hxx file. This makes the 'value_traits'
@@ -52,25 +55,25 @@ driver.cxx
instance. It then persists a number of 'person' objects in the database
and executes a query to find objects matching certain criteria.
-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++ -DDATABASE_MYSQL -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 person-odb.cxx
+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
diff --git a/odb-examples/optimistic/README b/odb-examples/optimistic/README
index dfa2bd5..f9dca11 100644
--- a/odb-examples/optimistic/README
+++ b/odb-examples/optimistic/README
@@ -22,7 +22,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
@@ -40,25 +40,25 @@ driver.cxx
delete this object. For each step the driver prints the versions of the
object as seen by each process.
-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
diff --git a/odb-examples/pimpl/README b/odb-examples/pimpl/README
index 47bfbc8..59ffd25 100644
--- a/odb-examples/pimpl/README
+++ b/odb-examples/pimpl/README
@@ -21,7 +21,7 @@ person.sql
odb --std c++11 -d <database> --generate-query --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
@@ -37,26 +37,26 @@ driver.cxx
instance. Then it executes a number of database transactions on the 'person'
objects.
-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.cxx
c++ -c person-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o person.o person-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o person.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
diff --git a/odb-examples/prepared/README b/odb-examples/prepared/README
index 644e11a..49ae377 100644
--- a/odb-examples/prepared/README
+++ b/odb-examples/prepared/README
@@ -22,7 +22,7 @@ person.sql
--generate-schema person.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --generate-prepared option requests the generation of the prepared
query support code.
@@ -41,25 +41,25 @@ driver.cxx
instance and creates a number of persistent objects. It then prepares and
executes a number of queries to illustrate various usage scenarios.
-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
diff --git a/odb-examples/query/README b/odb-examples/query/README
index 175ef21..cee06d6 100644
--- a/odb-examples/query/README
+++ b/odb-examples/query/README
@@ -19,7 +19,7 @@ person.sql
odb --std c++11 -d <database> --generate-query --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
@@ -35,25 +35,25 @@ driver.cxx
instance. It then persists a number of 'person' objects in the database
and executes a number of queries to find objects matching various criteria.
-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
diff --git a/odb-examples/relationship/README b/odb-examples/relationship/README
index 1f517bd..fd4e3cd 100644
--- a/odb-examples/relationship/README
+++ b/odb-examples/relationship/README
@@ -22,7 +22,7 @@ employee.sql
--generate-session --default-pointer std::shared_ptr employee.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --generate-session option is used to enable session support for all
the persistent classes in employee.hxx. The --default-pointer option is
@@ -46,25 +46,25 @@ driver.cxx
driver performs a database query which uses a data member from a related
object in its criterion.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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
diff --git a/odb-examples/schema/custom/README b/odb-examples/schema/custom/README
index 73fc1cc..48699d0 100644
--- a/odb-examples/schema/custom/README
+++ b/odb-examples/schema/custom/README
@@ -21,7 +21,7 @@ employee-odb.cxx
--default-pointer std::shared_ptr employee.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --generate-session option is used to enable session support for all
the persistent classes in employee.hxx. The --default-pointer option is
@@ -44,16 +44,16 @@ driver.cxx
and persists them in the database. Finally, the driver performs a database
query and prints the information about the returned objects.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-odb.o -lodb-pgsql -lodb
-To run the driver, using MySQL as an example, we can execute the following
-command:
+To run the driver, using PostgreSQL as an example, we can execute the
+following command:
./driver --user odb_test --database odb_test
diff --git a/odb-examples/schema/embedded/README b/odb-examples/schema/embedded/README
index 10084a3..50c3f7e 100644
--- a/odb-examples/schema/embedded/README
+++ b/odb-examples/schema/embedded/README
@@ -17,7 +17,7 @@ person-odb.cxx
--generate-query person.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --generate-schema option requests the generation of the database schema.
The --schema-format option is used to instruct the ODB compiler to embed the
@@ -46,16 +46,16 @@ driver.cxx
objects, performs a database query, and prints the information about the
returned objects.
-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 driver, using MySQL as an example, we can execute the following
-command:
+To run the driver, using PostgreSQL as an example, we can execute the
+following command:
./driver --user odb_test --database odb_test
diff --git a/odb-examples/section/README b/odb-examples/section/README
index bcbf522..5048ef9 100644
--- a/odb-examples/section/README
+++ b/odb-examples/section/README
@@ -20,7 +20,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
@@ -39,25 +39,25 @@ driver.cxx
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
diff --git a/odb-examples/view/README b/odb-examples/view/README
index 1ea1842..176521f 100644
--- a/odb-examples/view/README
+++ b/odb-examples/view/README
@@ -27,7 +27,7 @@ employee.sql
--default-pointer std::shared_ptr --generate-session employee.hxx
Where <database> stands for the database system we are using, for example,
- 'mysql'.
+ 'pgsql'.
The --default-pointer option is used to make std::shared_ptr the default
object pointer. The --generate-session option is used to enable session
@@ -49,25 +49,25 @@ driver.cxx
'employee' objects. Once this is done, the driver uses views defined in
employee.hxx to load and print various information about the object model.
-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 employee-odb.cxx
-c++ -DDATABASE_MYSQL -c driver.cxx
-c++ -o driver driver.o employee-odb.o -lodb-mysql -lodb
+c++ -DDATABASE_PGSQL -c driver.cxx
+c++ -o driver driver.o employee-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 < employee.sql
+psql --username=odb_test --dbname=odb_test -f employee.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