From daf580eaa10cff0bbd0d3660a74c3427dce0052a Mon Sep 17 00:00:00 2001
From: Boris Kolpackov char[N]
, and unsigned char[N]
types
to the MySQL BLOB types. However, these mappings are not enabled by
default (in particular, by default, std::vector
will
- be treated as a container). To enable the alternative mapping for these
+ be treated as a container). To enable the alternative mappings for these
types we need to specify the database type explicitly using the
db type
pragma (Section
12.4.3, "type
"), for example:
Due to the granularity of the SQLite error codes, it is impossible
to distinguish between the duplicate primary key and other constraint
- violations. As a result, when making an object persistent, The SQLite
+ violations. As a result, when making an object persistent, the SQLite
ODB runtime will translate all constraint violation errors to the
object_not_persistent
exception (Section
3.13, "ODB Exceptions").
Due to the granularity of the PostgreSQL error codes, it is impossible
to distinguish between the duplicate primary key and other unique
constraint violations. As a result, when making an object persistent,
- The PostgreSQL ODB runtime will translate all unique constraint violation
+ the PostgreSQL ODB runtime will translate all unique constraint violation
errors to the object_not_persistent
exception
(Section 3.13, "ODB Exceptions").
You will need to include the <odb/oracle/database.hxx>
header file to make this class available in your application.
The Oracle database
class contains the OCI environment
+
The Oracle database
class encapsulates the OCI environment
handle as well as the database connection string and user credentials
that are used to establish connections to the database.
The second constructor allows us to specify the individual components
of a connection identifier as the service
, host
,
and port
arguments. If the host
argument is
- empty then localhost is used by default. Similarly, if the
+ empty, then localhost is used by default. Similarly, if the
port
argument is zero, then the default port is used.
The last constructor extracts the database parameters
@@ -12654,9 +12654,8 @@ namespace odb
or all of the database options in a file with each option appearing
on a separate line followed by a space and an option value. Note that it
is invalid to specify the --database
option
- together with any of --service
,
- --host
, or --port
- options.
--service
, --host
, or
+ --port
options.
If the erase
argument to this constructor is true,
then the above options are removed from the argv
@@ -12685,13 +12684,14 @@ namespace odb
to and received from the application in this encoding. For the complete
list of available character encoding values, refer to the Oracle
documentation. Commonly used encoding values are 873
- (UTF-8), 31 (ISO-8859-1), and 1000
(UTF-16). If the
- database character encoding is not specified, then the NLS_LANG
- environment/registry variable is used. Similarly, if the national
- character encoding is not specified, then the NLS_NCHAR
- environment/registry variable is used. For more information on character
- encodings, refer to the OCIEnvNlsCreate()
function in
- the Oracle Call Interface (OCI) documentation.
31
(ISO-8859-1), and 1000
(UTF-16).
+ If the database character encoding is not specified, then the
+ NLS_LANG
environment/registry variable is used. Similarly,
+ if the national character encoding is not specified, then the
+ NLS_NCHAR
environment/registry variable is used. For more
+ information on character encodings, refer to the
+ OCIEnvNlsCreate()
function in the Oracle Call Interface
+ (OCI) documentation.
The environment
argument allows us to provide a custom
OCI environment handle. If this argument is not NULL
,
@@ -12983,8 +12983,8 @@ namespace odb
The odb::oracle::database_exception
is thrown if
an Oracle database operation fails. The Oracle-specific error
- information is stores as a series of records, each containing
- the error code as a signed 4-byte integer and a message string.
+ information is stored as a series of records, each containing
+ the error code as a signed 4-byte integer and the message string.
All this information is also combined and returned in a
human-readable form by the what()
function.
Oracle limits the length of database identifiers (table, column, etc.,
names) to 30 characters. The ODB compiler automatically truncates
- any identifier that is longer than 30 character. This, however,
+ any identifier that is longer than 30 characters. This, however,
can lead to duplicate names. A common symptom of this problem
are errors during the database schema creation indicating
that a database object with the same name already exists. To
- resolve this problem you can assign custom, shorter identifiers
+ resolve this problem we can assign custom, shorter identifiers
using the db table
and db column
pragmas (Chapter 12, "ODB Pragma Language"). For
example:
Due to the granularity of the Oracle error codes, it is impossible
to distinguish between the duplicate primary key and other unique
constraint violations. As a result, when making an object persistent,
- The Oracle ODB runtime will translate all unique constraint violation
+ the Oracle ODB runtime will translate all unique constraint violation
errors to the object_not_persistent
exception
(Section 3.13, "ODB Exceptions").
FLOAT
and
NUMBER
TypesThe Oracle FLOAT
type with the binary precision greater
- than 53 and fixed-point NUMBER
type with the decimal
+
The Oracle FLOAT
type with a binary precision greater
+ than 53 and fixed-point NUMBER
type with a decimal
precision greater than 15 cannot be automatically extracted
into the C++ float
and double
types.
Instead, the Oracle ODB runtime uses a 21-byte buffer containing
the binary representation of a value as an image type for such
FLOAT
and NUMBER
types. In order to
- convert them into an application-specific large number representation
+ convert them into an application-specific large number representation,
you will need to provide a suitable value_traits
template specialization. For more information on the binary format
used to store the FLOAT
and NUMBER
values,
@@ -13655,7 +13655,7 @@ class person
Some valid Boost date-time values cannot be stored in an Oracle database.
An attempt to persist a gregorian::date
,
- posix_time::time_duration
, or
+ posix_time::ptime
, or
posix_time::time_duration
value representing any special
value other than date_time::not_a_date_time
will result in
the special_value
exception.
NCHAR
, and NVARCHAR
MySQL types.
However, these alternative mappings have to be explicitly
requested using the db type
pragma
- (Section 12.4.3, "type"), as show in
+ (Section 12.4.3, "type"), as shown in
the following example:
@@ -13831,11 +13831,11 @@ class Person function returnstrue
.The
basic
sub-profile also provides support - for mappingQString
to theCHAR
, + for mappingQString
to theCHAR
andVARCHAR
PostgreSQL types. However, these alternative mappings have to be explicitly requested using thedb type
pragma - (Section 12.4.3, "type"), as show in + (Section 12.4.3, "type"), as shown in the following example:@@ -13881,11 +13881,11 @@ class PersonThe
basic
sub-profile also provides support for mappingQString
to theCHAR
, -NCHAR
,NVARCHAR
,CLOB
and +NCHAR
,NVARCHAR
,CLOB
, andNCLOB
Oracle types, and for mappingQByteArray
to theRAW
Oracle type. However, these alternative mappings have to be explicitly requested using thedb type
- pragma (Section 12.4.3, "type"), as show in the + pragma (Section 12.4.3, "type"), as shown in the following example:-- cgit v1.1